mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
Fix nxstyle warnings
This commit is contained in:
committed by
Xiang Xiao
parent
698008d1e5
commit
5bb4eb39f2
@@ -155,7 +155,6 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
g_current_regs[REG_EPC] = (uint32_t)lm32_sigdeliver;
|
||||
g_current_regs[REG_INT_CTX] = 0;
|
||||
|
||||
|
||||
/* And make sure that the saved context in the TCB
|
||||
* is the same as the interrupt return context.
|
||||
*/
|
||||
|
||||
@@ -133,16 +133,16 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
*
|
||||
* Hmmm... there looks like a latent bug here: The following logic
|
||||
* would fail in the strange case where we are in an interrupt
|
||||
* handler, the thread is signalling itself, but a context switch to
|
||||
* another task has occurred so that g_current_regs does not refer
|
||||
* to the thread of this_task()!
|
||||
* handler, the thread is signalling itself, but a context switch
|
||||
* to another task has occurred so that g_current_regs does not
|
||||
* refer to the thread of this_task()!
|
||||
*/
|
||||
|
||||
else
|
||||
{
|
||||
/* Save the return EPC and STATUS registers. These will be
|
||||
* restored by the signal trampoline after the signals have been
|
||||
* delivered.
|
||||
* restored by the signal trampoline after the signals have
|
||||
* been delivered.
|
||||
*/
|
||||
|
||||
tcb->xcp.sigdeliver = sigdeliver;
|
||||
@@ -175,15 +175,18 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
|
||||
else
|
||||
{
|
||||
/* Save the return EPC and STATUS registers. These will be restored
|
||||
* by the signal trampoline after the signals have been delivered.
|
||||
/* Save the return EPC and STATUS registers. These will be
|
||||
* restored by the signal trampoline after the signals have been
|
||||
* delivered.
|
||||
*/
|
||||
|
||||
tcb->xcp.sigdeliver = sigdeliver;
|
||||
tcb->xcp.saved_epc = tcb->xcp.regs[REG_CSR_MEPC];
|
||||
tcb->xcp.saved_int_ctx = tcb->xcp.regs[REG_CSR_MSTATUS];
|
||||
|
||||
/* Then set up to vector to the trampoline with interrupts disabled */
|
||||
/* Then set up to vector to the trampoline with interrupts
|
||||
* disabled
|
||||
*/
|
||||
|
||||
tcb->xcp.regs[REG_CSR_MEPC] = (uint32_t) minerva_sigdeliver;
|
||||
g_current_regs[REG_CSR_MSTATUS] &= ~CSR_MSTATUS_MIE;
|
||||
|
||||
Reference in New Issue
Block a user