Revert "Reduce the size of tcb by four bytes."

This reverts commit 893c5e92c2.
This commit is contained in:
wangzhi16
2025-05-27 10:56:42 +08:00
committed by Xiang Xiao
parent 17476346d1
commit 35a62b7d5e
70 changed files with 267 additions and 369 deletions
@@ -33,7 +33,6 @@
#include <nuttx/arch.h>
#include "sched/sched.h"
#include "signal/signal.h"
#include "ceva_internal.h"
#ifndef CONFIG_DISABLE_SIGNALS
@@ -101,8 +100,8 @@ void up_schedule_sigaction(struct tcb_s *tcb)
{
/* In this case just deliver the signal now. */
nxsig_deliver(tcb);
tcb->flags &= ~TCB_FLAG_SIGDELIVER;
(tcb->sigdeliver)(tcb);
tcb->sigdeliver = NULL;
}
/* CASE 2: The task that needs to receive the signal is running.
+10 -8
View File
@@ -54,6 +54,7 @@ void ceva_sigdeliver(void)
{
struct tcb_s *rtcb = this_task();
uint32_t *regs = rtcb->xcp.saved_regs;
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
* so that the user code final gets the correct errno value (probably
@@ -62,20 +63,21 @@ void ceva_sigdeliver(void)
int saved_errno = rtcb->pterrno;
sinfo("rtcb=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigpendactionq.head);
DEBUGASSERT((rtcb->flags & TCB_FLAG_SIGDELIVER) != 0);
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head);
DEBUGASSERT(rtcb->sigdeliver != NULL);
/* We do this so that we can nullify the TCB_FLAG_SIGDELIVER in the TCB
* and accept more signal deliveries while processing the current pending
* signals.
/* Get a local copy of the sigdeliver function pointer. We do this so that
* we can nullify the sigdeliver function pointer in the TCB and accept
* more signal deliveries while processing the current pending signals.
*/
rtcb->flags &= ~TCB_FLAG_SIGDELIVER;
sigdeliver = rtcb->sigdeliver;
rtcb->sigdeliver = NULL;
/* Deliver the signal */
nxsig_deliver(rtcb);
sigdeliver(rtcb);
/* Output any debug messages BEFORE restoring errno (because they may
* alter errno), then disable interrupts again and restore the original