mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 21:20:26 +08:00
Reduce the size of tcb by four bytes.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "sched/sched.h"
|
||||
#include "signal/signal.h"
|
||||
#include "x86_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -91,8 +92,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
|
||||
{
|
||||
/* In this case just deliver the signal now. */
|
||||
|
||||
(tcb->sigdeliver)(tcb);
|
||||
tcb->sigdeliver = NULL;
|
||||
nxsig_deliver(tcb);
|
||||
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
|
||||
}
|
||||
|
||||
/* CASE 2: We are in an interrupt handler AND the interrupted task
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "sched/sched.h"
|
||||
#include "signal/signal.h"
|
||||
#include "x86_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
@@ -60,9 +61,9 @@ void x86_sigdeliver(void)
|
||||
|
||||
board_autoled_on(LED_SIGNAL);
|
||||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
|
||||
DEBUGASSERT(rtcb->sigdeliver != NULL);
|
||||
sinfo("rtcb=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->sigpendactionq.head);
|
||||
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
|
||||
|
||||
/* Save the return state on the stack. */
|
||||
|
||||
@@ -78,7 +79,7 @@ void x86_sigdeliver(void)
|
||||
|
||||
/* Deliver the signals */
|
||||
|
||||
(rtcb->sigdeliver)(rtcb);
|
||||
nxsig_deliver(rtcb);
|
||||
|
||||
/* Output any debug messages BEFORE restoring errno (because they may
|
||||
* alter errno), then disable interrupts again and restore the original
|
||||
@@ -100,7 +101,10 @@ void x86_sigdeliver(void)
|
||||
|
||||
regs[REG_EIP] = rtcb->xcp.saved_eip;
|
||||
regs[REG_EFLAGS] = rtcb->xcp.saved_eflags;
|
||||
rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */
|
||||
|
||||
/* Allows next handler to be scheduled */
|
||||
|
||||
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
|
||||
|
||||
/* Then restore the correct state for this thread of execution. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user