Fix nxstyle warnings

This commit is contained in:
Yoshinori Sugino 2020-09-28 12:43:13 +09:00 committed by Xiang Xiao
parent 698008d1e5
commit 5bb4eb39f2
10 changed files with 59 additions and 39 deletions

View File

@ -136,9 +136,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
else
{
/* Save registers that must be protected while the signal handler
* runs. These will be restored by the signal trampoline after
* the signal(s) have been delivered.
/* Save registers that must be protected while the signal
* handler runs. These will be restored by the signal
* trampoline after the signal(s) have been delivered.
*/
tcb->xcp.sigdeliver = sigdeliver;

View File

@ -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.
*/

View File

@ -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;

View File

@ -140,15 +140,18 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
*/
tcb->xcp.sigdeliver = sigdeliver;
//tcb->xcp.saved_pc = CURRENT_REGS[REG_PC];
//tcb->xcp.saved_cpsr = CURRENT_REGS[REG_CPSR];
/* tcb->xcp.saved_pc = CURRENT_REGS[REG_PC];
* tcb->xcp.saved_cpsr = CURRENT_REGS[REG_CPSR];
*/
/* Then set up to vector to the trampoline with interrupts
* disabled
*/
//CURRENT_REGS[REG_PC] = (uint32_t)up_sigdeliver;
//CURRENT_REGS[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
/* CURRENT_REGS[REG_PC] = (uint32_t)up_sigdeliver;
* CURRENT_REGS[REG_CPSR] = SVC_MODE | PSR_I_BIT |
* PSR_F_BIT;
*/
/* And make sure that the saved context in the TCB
* is the same as the interrupt return context.
@ -173,14 +176,16 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
tcb->xcp.sigdeliver = sigdeliver;
tcb->xcp.saved_pc = tcb->xcp.regs[REG_PC];
//tcb->xcp.saved_cpsr = tcb->xcp.regs[REG_CPSR];
/* tcb->xcp.saved_cpsr = tcb->xcp.regs[REG_CPSR]; */
/* Then set up to vector to the trampoline with interrupts
* disabled
*/
//tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
//tcb->xcp.regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
/* tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
* tcb->xcp.regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
*/
}
}

View File

@ -51,7 +51,7 @@
#include "up_arch.h"
/****************************************************************************
* Public Funictions
* Public Functions
****************************************************************************/
/****************************************************************************
@ -135,7 +135,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
tcb->xcp.sigdeliver = sigdeliver;
tcb->xcp.saved_pc[0] = g_current_regs[REG_PC];
tcb->xcp.saved_pc[1] = g_current_regs[REG_PC+1];
tcb->xcp.saved_pc[1] = g_current_regs[REG_PC + 1];
tcb->xcp.saved_flg = g_current_regs[REG_FLG];
/* Then set up to vector to the trampoline with interrupts
@ -143,7 +143,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
*/
g_current_regs[REG_PC] = (uint32_t)up_sigdeliver >> 8;
g_current_regs[REG_PC+1] = (uint32_t)up_sigdeliver;
g_current_regs[REG_PC + 1] = (uint32_t)up_sigdeliver;
g_current_regs[REG_FLG] &= ~M16C_FLG_I;
/* And make sure that the saved context in the TCB
@ -169,7 +169,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
tcb->xcp.sigdeliver = sigdeliver;
tcb->xcp.saved_pc[0] = tcb->xcp.regs[REG_PC];
tcb->xcp.saved_pc[1] = tcb->xcp.regs[REG_PC+1];
tcb->xcp.saved_pc[1] = tcb->xcp.regs[REG_PC + 1];
tcb->xcp.saved_flg = tcb->xcp.regs[REG_FLG];
/* Then set up to vector to the trampoline with interrupts
@ -177,7 +177,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
*/
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver >> 8;
tcb->xcp.regs[REG_PC+1] = (uint32_t)up_sigdeliver;
tcb->xcp.regs[REG_PC + 1] = (uint32_t)up_sigdeliver;
tcb->xcp.regs[REG_FLG] &= ~M16C_FLG_I;
}
}

View File

@ -51,7 +51,7 @@
#include "up_arch.h"
/****************************************************************************
* Public Funictions
* Public Functions
****************************************************************************/
/****************************************************************************

View File

@ -136,7 +136,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
else
{
/* Set up to vector to the trampoline with interrupts disabled. */
/* Set up to vector to the trampoline with interrupts
* disabled.
*/
ez80_sigsetup(tcb, sigdeliver, IRQ_STATE());

View File

@ -154,7 +154,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
else
{
/* Set up to vector to the trampoline with interrupts disabled. */
/* Set up to vector to the trampoline with interrupts
* disabled.
*/
z180_sigsetup(tcb, sigdeliver, IRQ_STATE());
@ -166,9 +168,10 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
}
}
/* Otherwise, we are (1) signaling a task is not running from an interrupt
* handler or (2) we are not in an interrupt handler and the running task
* is signalling some non-running task.
/* Otherwise, we are (1) signaling a task is not running
* from an interrupt handler or (2) we are not in an
* interrupt handler and the running task is signalling
* some non-running task.
*/
else

View File

@ -151,7 +151,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
else
{
/* Set up to vector to the trampoline with interrupts disabled. */
/* Set up to vector to the trampoline with interrupts
* disabled.
*/
z8_sigsetup(tcb, sigdeliver, IRQ_STATE());
@ -163,14 +165,17 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
}
}
/* Otherwise, we are (1) signaling a task is not running from an interrupt
* handler or (2) we are not in an interrupt handler and the running task
* is signalling some non-running task.
/* Otherwise, we are (1) signaling a task is not running
* from an interrupt handler or (2) we are not in an
* interrupt handler and the running task is signalling
* some non-running task.
*/
else
{
/* Set up to vector to the trampoline with interrupts disabled. */
/* Set up to vector to the trampoline with interrupts
* disabled.
*/
z8_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
}

View File

@ -152,7 +152,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
else
{
/* Set up to vector to the trampoline with interrupts disabled. */
/* Set up to vector to the trampoline with interrupts
* disabled.
*/
z80_sigsetup(tcb, sigdeliver, IRQ_STATE());
@ -164,9 +166,10 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
}
}
/* Otherwise, we are (1) signaling a task is not running from an interrupt
* handler or (2) we are not in an interrupt handler and the running task
* is signalling some non-running task.
/* Otherwise, we are (1) signaling a task is not running
* from an interrupt handler or (2) we are not in an
* interrupt handler and the running task is signalling
* some non-running task.
*/
else