diff --git a/arch/arm/include/arm/irq.h b/arch/arm/include/arm/irq.h index a3321d7c62c..246410e47d4 100644 --- a/arch/arm/include/arm/irq.h +++ b/arch/arm/include/arm/irq.h @@ -127,12 +127,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/armv6-m/irq.h b/arch/arm/include/armv6-m/irq.h index 752e3ed3940..6d142accfa9 100644 --- a/arch/arm/include/armv6-m/irq.h +++ b/arch/arm/include/armv6-m/irq.h @@ -152,12 +152,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/armv7-a/irq.h b/arch/arm/include/armv7-a/irq.h index 6ca190b0715..803d5807d3e 100644 --- a/arch/arm/include/armv7-a/irq.h +++ b/arch/arm/include/armv7-a/irq.h @@ -253,12 +253,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/armv7-m/irq.h b/arch/arm/include/armv7-m/irq.h index 88db5d3ba36..c387899f605 100644 --- a/arch/arm/include/armv7-m/irq.h +++ b/arch/arm/include/armv7-m/irq.h @@ -212,12 +212,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/armv7-r/irq.h b/arch/arm/include/armv7-r/irq.h index 6a00fbdbc32..402606a546a 100644 --- a/arch/arm/include/armv7-r/irq.h +++ b/arch/arm/include/armv7-r/irq.h @@ -253,12 +253,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/armv8-m/irq.h b/arch/arm/include/armv8-m/irq.h index f14d84f6553..fb23d569b7d 100644 --- a/arch/arm/include/armv8-m/irq.h +++ b/arch/arm/include/armv8-m/irq.h @@ -223,12 +223,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/armv8-r/irq.h b/arch/arm/include/armv8-r/irq.h index 360b4a74585..c3be8199f3b 100644 --- a/arch/arm/include/armv8-r/irq.h +++ b/arch/arm/include/armv8-r/irq.h @@ -253,12 +253,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/arm/include/tlsr82/irq.h b/arch/arm/include/tlsr82/irq.h index 7cf89085427..751baa6f61d 100644 --- a/arch/arm/include/tlsr82/irq.h +++ b/arch/arm/include/tlsr82/irq.h @@ -158,12 +158,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved register array pointer used during * signal processing. */ diff --git a/arch/arm/src/arm/arm_schedulesigaction.c b/arch/arm/src/arm/arm_schedulesigaction.c index a0a4017bf42..2643eb3f0d1 100644 --- a/arch/arm/src/arm/arm_schedulesigaction.c +++ b/arch/arm/src/arm/arm_schedulesigaction.c @@ -81,9 +81,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -97,7 +97,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* Otherwise, we are (1) signaling a task is not running diff --git a/arch/arm/src/arm/arm_sigdeliver.c b/arch/arm/src/arm/arm_sigdeliver.c index 21a0b98baac..22589d1e6e7 100644 --- a/arch/arm/src/arm/arm_sigdeliver.c +++ b/arch/arm/src/arm/arm_sigdeliver.c @@ -59,8 +59,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always @@ -72,7 +72,7 @@ void arm_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -92,7 +92,7 @@ void arm_sigdeliver(void) * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/arm/src/armv6-m/arm_schedulesigaction.c b/arch/arm/src/armv6-m/arm_schedulesigaction.c index 855dacdcc1d..dfd5031bfd3 100644 --- a/arch/arm/src/armv6-m/arm_schedulesigaction.c +++ b/arch/arm/src/armv6-m/arm_schedulesigaction.c @@ -85,9 +85,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -103,7 +103,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm/src/armv6-m/arm_sigdeliver.c b/arch/arm/src/armv6-m/arm_sigdeliver.c index d8390b375ca..fb039d57d88 100644 --- a/arch/arm/src/armv6-m/arm_sigdeliver.c +++ b/arch/arm/src/armv6-m/arm_sigdeliver.c @@ -68,8 +68,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -101,7 +101,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -148,7 +148,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/arm/src/armv7-a/arm_schedulesigaction.c b/arch/arm/src/armv7-a/arm_schedulesigaction.c index ef98b8e1a86..2727d545dbd 100644 --- a/arch/arm/src/armv7-a/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-a/arm_schedulesigaction.c @@ -83,9 +83,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on this CPU. @@ -101,7 +101,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm/src/armv7-a/arm_sigdeliver.c b/arch/arm/src/armv7-a/arm_sigdeliver.c index e1777e5ae25..98ac0e115b6 100644 --- a/arch/arm/src/armv7-a/arm_sigdeliver.c +++ b/arch/arm/src/armv7-a/arm_sigdeliver.c @@ -68,8 +68,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -101,7 +101,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -148,7 +148,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/src/armv7-a/arm_syscall.c index e2791e1817c..8ad689db5a8 100644 --- a/arch/arm/src/armv7-a/arm_syscall.c +++ b/arch/arm/src/armv7-a/arm_syscall.c @@ -430,7 +430,7 @@ uint32_t *arm_syscall(uint32_t *regs) /* Copy "info" into user stack */ - if (rtcb->xcp.sigdeliver) + if (rtcb->sigdeliver) { usp = rtcb->xcp.saved_regs[REG_SP]; } diff --git a/arch/arm/src/armv7-m/arm_schedulesigaction.c b/arch/arm/src/armv7-m/arm_schedulesigaction.c index c7cbf9a8d11..05da1b9d4e0 100644 --- a/arch/arm/src/armv7-m/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-m/arm_schedulesigaction.c @@ -86,9 +86,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -104,7 +104,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm/src/armv7-m/arm_sigdeliver.c b/arch/arm/src/armv7-m/arm_sigdeliver.c index 961ca31b598..524f2c445b6 100644 --- a/arch/arm/src/armv7-m/arm_sigdeliver.c +++ b/arch/arm/src/armv7-m/arm_sigdeliver.c @@ -68,8 +68,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -105,7 +105,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -156,7 +156,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/arm/src/armv7-r/arm_schedulesigaction.c b/arch/arm/src/armv7-r/arm_schedulesigaction.c index b58ef10d26b..f23262badf3 100644 --- a/arch/arm/src/armv7-r/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-r/arm_schedulesigaction.c @@ -81,9 +81,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -99,7 +99,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm/src/armv7-r/arm_sigdeliver.c b/arch/arm/src/armv7-r/arm_sigdeliver.c index c21b77ed10b..2f72c1beeee 100644 --- a/arch/arm/src/armv7-r/arm_sigdeliver.c +++ b/arch/arm/src/armv7-r/arm_sigdeliver.c @@ -68,8 +68,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -101,7 +101,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -145,7 +145,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/arm/src/armv7-r/arm_syscall.c b/arch/arm/src/armv7-r/arm_syscall.c index d7dcdbcfe97..aa01170622e 100644 --- a/arch/arm/src/armv7-r/arm_syscall.c +++ b/arch/arm/src/armv7-r/arm_syscall.c @@ -427,7 +427,7 @@ uint32_t *arm_syscall(uint32_t *regs) /* Copy "info" into user stack */ - if (rtcb->xcp.sigdeliver) + if (rtcb->sigdeliver) { usp = rtcb->xcp.saved_regs[REG_SP]; } diff --git a/arch/arm/src/armv8-m/arm_schedulesigaction.c b/arch/arm/src/armv8-m/arm_schedulesigaction.c index f13fa3dcf03..6c2c936275a 100644 --- a/arch/arm/src/armv8-m/arm_schedulesigaction.c +++ b/arch/arm/src/armv8-m/arm_schedulesigaction.c @@ -86,9 +86,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -104,7 +104,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm/src/armv8-m/arm_sigdeliver.c b/arch/arm/src/armv8-m/arm_sigdeliver.c index f8588136fbc..2db03f17d16 100644 --- a/arch/arm/src/armv8-m/arm_sigdeliver.c +++ b/arch/arm/src/armv8-m/arm_sigdeliver.c @@ -68,8 +68,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -105,7 +105,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -156,7 +156,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/arm/src/armv8-r/arm_schedulesigaction.c b/arch/arm/src/armv8-r/arm_schedulesigaction.c index 099d313de50..77ee55430eb 100644 --- a/arch/arm/src/armv8-r/arm_schedulesigaction.c +++ b/arch/arm/src/armv8-r/arm_schedulesigaction.c @@ -81,9 +81,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -99,7 +99,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm/src/armv8-r/arm_sigdeliver.c b/arch/arm/src/armv8-r/arm_sigdeliver.c index e249869434d..29a422040c2 100644 --- a/arch/arm/src/armv8-r/arm_sigdeliver.c +++ b/arch/arm/src/armv8-r/arm_sigdeliver.c @@ -68,8 +68,8 @@ void arm_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -101,7 +101,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -145,7 +145,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/arm/src/armv8-r/arm_syscall.c b/arch/arm/src/armv8-r/arm_syscall.c index 285613ed4b0..abf3b191f47 100644 --- a/arch/arm/src/armv8-r/arm_syscall.c +++ b/arch/arm/src/armv8-r/arm_syscall.c @@ -426,7 +426,7 @@ uint32_t *arm_syscall(uint32_t *regs) /* Copy "info" into user stack */ - if (rtcb->xcp.sigdeliver) + if (rtcb->sigdeliver) { usp = rtcb->xcp.saved_regs[REG_SP]; } diff --git a/arch/arm/src/tlsr82/tc32/tc32_schedulesigaction.c b/arch/arm/src/tlsr82/tc32/tc32_schedulesigaction.c index 4e90afee3a8..fcc2bdcc25f 100644 --- a/arch/arm/src/tlsr82/tc32/tc32_schedulesigaction.c +++ b/arch/arm/src/tlsr82/tc32/tc32_schedulesigaction.c @@ -81,9 +81,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -97,7 +97,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* Otherwise, we are (1) signaling a task is not running diff --git a/arch/arm64/include/irq.h b/arch/arm64/include/irq.h index b4ce09ce284..47571b2a58f 100644 --- a/arch/arm64/include/irq.h +++ b/arch/arm64/include/irq.h @@ -243,12 +243,6 @@ extern "C" struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - #ifdef CONFIG_BUILD_KERNEL /* This is the saved address to use when returning from a user-space * signal handler. diff --git a/arch/arm64/src/common/arm64_schedulesigaction.c b/arch/arm64/src/common/arm64_schedulesigaction.c index ce145980dfe..05c5725bb46 100644 --- a/arch/arm64/src/common/arm64_schedulesigaction.c +++ b/arch/arm64/src/common/arm64_schedulesigaction.c @@ -118,9 +118,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -133,7 +133,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/arm64/src/common/arm64_sigdeliver.c b/arch/arm64/src/common/arm64_sigdeliver.c index 0d46a98410d..2a0fdd65cc3 100644 --- a/arch/arm64/src/common/arm64_sigdeliver.c +++ b/arch/arm64/src/common/arm64_sigdeliver.c @@ -70,8 +70,8 @@ void arm64_sigdeliver(void) #endif sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -103,7 +103,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -150,7 +150,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ rtcb->xcp.regs = rtcb->xcp.saved_reg; /* Then restore the correct state for this thread of execution. */ diff --git a/arch/avr/include/avr/irq.h b/arch/avr/include/avr/irq.h index a0df8a95e2e..df9a82dbae4 100644 --- a/arch/avr/include/avr/irq.h +++ b/arch/avr/include/avr/irq.h @@ -93,12 +93,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of PC and SR used during signal processing. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/avr/include/avr32/irq.h b/arch/avr/include/avr32/irq.h index 755d9086ceb..ed8e064bc62 100644 --- a/arch/avr/include/avr32/irq.h +++ b/arch/avr/include/avr32/irq.h @@ -93,12 +93,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of PC and SR used during signal processing. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/avr/src/avr/avr_schedulesigaction.c b/arch/avr/src/avr/avr_schedulesigaction.c index 251556aa91b..bf00b6c943b 100644 --- a/arch/avr/src/avr/avr_schedulesigaction.c +++ b/arch/avr/src/avr/avr_schedulesigaction.c @@ -83,9 +83,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -104,7 +104,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/avr/src/avr/avr_sigdeliver.c b/arch/avr/src/avr/avr_sigdeliver.c index 24b56fc8ee0..be1093bcfb3 100644 --- a/arch/avr/src/avr/avr_sigdeliver.c +++ b/arch/avr/src/avr/avr_sigdeliver.c @@ -59,8 +59,8 @@ void avr_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -76,7 +76,7 @@ void avr_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -96,13 +96,13 @@ void avr_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_PC0] = rtcb->xcp.saved_pc0; - regs[REG_PC1] = rtcb->xcp.saved_pc1; + regs[REG_PC0] = rtcb->xcp.saved_pc0; + regs[REG_PC1] = rtcb->xcp.saved_pc1; #if defined(REG_PC2) - regs[REG_PC2] = rtcb->xcp.saved_pc2; + regs[REG_PC2] = rtcb->xcp.saved_pc2; #endif - regs[REG_SREG] = rtcb->xcp.saved_sreg; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_SREG] = rtcb->xcp.saved_sreg; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. This is an * unusual case that must be handled by up_fullcontextresore. This case is diff --git a/arch/avr/src/avr32/avr_initialstate.c b/arch/avr/src/avr32/avr_initialstate.c index a48315678e4..14e9886a4c6 100644 --- a/arch/avr/src/avr32/avr_initialstate.c +++ b/arch/avr/src/avr32/avr_initialstate.c @@ -87,7 +87,7 @@ void up_initial_state(struct tcb_s *tcb) #else /* No pending signal delivery */ - xcp->sigdeliver = NULL; + tcb->sigdeliver = NULL; /* Clear the frame pointer and link register since this is the outermost * frame. diff --git a/arch/avr/src/avr32/avr_schedulesigaction.c b/arch/avr/src/avr32/avr_schedulesigaction.c index 0a84063baad..294bd31bcc3 100644 --- a/arch/avr/src/avr32/avr_schedulesigaction.c +++ b/arch/avr/src/avr32/avr_schedulesigaction.c @@ -81,9 +81,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -102,7 +102,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/avr/src/avr32/avr_sigdeliver.c b/arch/avr/src/avr32/avr_sigdeliver.c index ca81e807ced..331ac29fd62 100644 --- a/arch/avr/src/avr32/avr_sigdeliver.c +++ b/arch/avr/src/avr32/avr_sigdeliver.c @@ -63,8 +63,8 @@ void avr_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -80,7 +80,7 @@ void avr_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -100,9 +100,9 @@ void avr_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_PC] = rtcb->xcp.saved_pc; - regs[REG_SR] = rtcb->xcp.saved_sr; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_PC] = rtcb->xcp.saved_pc; + regs[REG_SR] = rtcb->xcp.saved_sr; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. This is an * unusual case that must be handled by up_fullcontextresore. This case is diff --git a/arch/ceva/include/xc5/irq.h b/arch/ceva/include/xc5/irq.h index cf77787e0af..0d413daccb7 100644 --- a/arch/ceva/include/xc5/irq.h +++ b/arch/ceva/include/xc5/irq.h @@ -127,12 +127,6 @@ struct xcpt_syscall_s struct xcptcontext { #ifndef CONFIG_DISABLE_SIGNALS - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/ceva/include/xm6/irq.h b/arch/ceva/include/xm6/irq.h index 0a735828ec2..44732f3d9e4 100644 --- a/arch/ceva/include/xm6/irq.h +++ b/arch/ceva/include/xm6/irq.h @@ -130,12 +130,6 @@ struct xcpt_syscall_s struct xcptcontext { #ifndef CONFIG_DISABLE_SIGNALS - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/ceva/src/common/ceva_schedulesigaction.c b/arch/ceva/src/common/ceva_schedulesigaction.c index 2eea396b0b9..7f79d23341e 100644 --- a/arch/ceva/src/common/ceva_schedulesigaction.c +++ b/arch/ceva/src/common/ceva_schedulesigaction.c @@ -79,9 +79,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: The task that needs to receive the signal is running. diff --git a/arch/ceva/src/common/ceva_sigdeliver.c b/arch/ceva/src/common/ceva_sigdeliver.c index 3bf25abdffa..9d0deb4bf38 100644 --- a/arch/ceva/src/common/ceva_sigdeliver.c +++ b/arch/ceva/src/common/ceva_sigdeliver.c @@ -62,16 +62,16 @@ void ceva_sigdeliver(void) int saved_errno = rtcb->pterrno; sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* 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. */ - sigdeliver = (sig_deliver_t)rtcb->xcp.sigdeliver; - rtcb->xcp.sigdeliver = NULL; + sigdeliver = rtcb->sigdeliver; + rtcb->sigdeliver = NULL; /* Deliver the signal */ diff --git a/arch/mips/include/mips32/irq.h b/arch/mips/include/mips32/irq.h index 228f95a5658..031ba4fe2b2 100644 --- a/arch/mips/include/mips32/irq.h +++ b/arch/mips/include/mips32/irq.h @@ -321,12 +321,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-NULL if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These additional register save locations are used to implement the * signal delivery trampoline. * diff --git a/arch/mips/src/mips32/mips_schedulesigaction.c b/arch/mips/src/mips32/mips_schedulesigaction.c index acbb8318fb5..7d1cd3a9ee3 100644 --- a/arch/mips/src/mips32/mips_schedulesigaction.c +++ b/arch/mips/src/mips32/mips_schedulesigaction.c @@ -84,9 +84,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -105,7 +105,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/mips/src/mips32/mips_sigdeliver.c b/arch/mips/src/mips32/mips_sigdeliver.c index ea810a56386..d942689c918 100644 --- a/arch/mips/src/mips32/mips_sigdeliver.c +++ b/arch/mips/src/mips32/mips_sigdeliver.c @@ -61,8 +61,8 @@ void mips_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -78,7 +78,7 @@ void mips_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -100,9 +100,9 @@ void mips_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_EPC] = rtcb->xcp.saved_epc; - regs[REG_STATUS] = rtcb->xcp.saved_status; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_EPC] = rtcb->xcp.saved_epc; + regs[REG_STATUS] = rtcb->xcp.saved_status; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/misoc/include/lm32/irq.h b/arch/misoc/include/lm32/irq.h index 69bdd8a271f..799cba3d5da 100644 --- a/arch/misoc/include/lm32/irq.h +++ b/arch/misoc/include/lm32/irq.h @@ -179,12 +179,6 @@ struct xcptcontext { - /* The following function pointer is non-NULL if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These additional register save locations are used to implement the * signal delivery trampoline. * diff --git a/arch/misoc/include/minerva/irq.h b/arch/misoc/include/minerva/irq.h index 4b81cec2814..c34c49861ec 100644 --- a/arch/misoc/include/minerva/irq.h +++ b/arch/misoc/include/minerva/irq.h @@ -261,12 +261,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-NULL if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These additional register save locations are used to implement the * signal delivery trampoline. */ diff --git a/arch/misoc/src/lm32/lm32_schedulesigaction.c b/arch/misoc/src/lm32/lm32_schedulesigaction.c index afc8edafe8d..f694a22e45b 100644 --- a/arch/misoc/src/lm32/lm32_schedulesigaction.c +++ b/arch/misoc/src/lm32/lm32_schedulesigaction.c @@ -81,9 +81,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -102,7 +102,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/misoc/src/lm32/lm32_sigdeliver.c b/arch/misoc/src/lm32/lm32_sigdeliver.c index 4adc8495590..081f40d6e37 100644 --- a/arch/misoc/src/lm32/lm32_sigdeliver.c +++ b/arch/misoc/src/lm32/lm32_sigdeliver.c @@ -60,8 +60,8 @@ void lm32_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -77,7 +77,7 @@ void lm32_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -99,9 +99,9 @@ void lm32_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_EPC] = rtcb->xcp.saved_epc; - regs[REG_INT_CTX] = rtcb->xcp.saved_int_ctx; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_EPC] = rtcb->xcp.saved_epc; + regs[REG_INT_CTX] = rtcb->xcp.saved_int_ctx; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/misoc/src/minerva/minerva_schedulesigaction.c b/arch/misoc/src/minerva/minerva_schedulesigaction.c index e0f2509aff0..02a02952e59 100644 --- a/arch/misoc/src/minerva/minerva_schedulesigaction.c +++ b/arch/misoc/src/minerva/minerva_schedulesigaction.c @@ -82,9 +82,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -103,7 +103,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task diff --git a/arch/misoc/src/minerva/minerva_sigdeliver.c b/arch/misoc/src/minerva/minerva_sigdeliver.c index ac2603f5046..306a1a77dfd 100644 --- a/arch/misoc/src/minerva/minerva_sigdeliver.c +++ b/arch/misoc/src/minerva/minerva_sigdeliver.c @@ -62,8 +62,8 @@ void minerva_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -76,8 +76,8 @@ void minerva_sigdeliver(void) * more signal deliveries while processing the current pending signals. */ - sigdeliver = rtcb->xcp.sigdeliver; - rtcb->xcp.sigdeliver = NULL; + sigdeliver = rtcb->sigdeliver; + rtcb->sigdeliver = NULL; # ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always diff --git a/arch/or1k/include/mor1kx/irq.h b/arch/or1k/include/mor1kx/irq.h index ba1e5f736bd..f45e5949ed2 100644 --- a/arch/or1k/include/mor1kx/irq.h +++ b/arch/or1k/include/mor1kx/irq.h @@ -170,12 +170,6 @@ struct xcptcontext uint32_t regs[XCPTCONTEXT_REGS]; - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of LR and CPSR used during * signal processing. * diff --git a/arch/or1k/src/common/or1k_schedulesigaction.c b/arch/or1k/src/common/or1k_schedulesigaction.c index 9ee20473d89..00e8944f6f5 100644 --- a/arch/or1k/src/common/or1k_schedulesigaction.c +++ b/arch/or1k/src/common/or1k_schedulesigaction.c @@ -80,9 +80,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -101,7 +101,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/renesas/include/m16c/irq.h b/arch/renesas/include/m16c/irq.h index 5b66067746f..f06aae80d8b 100644 --- a/arch/renesas/include/m16c/irq.h +++ b/arch/renesas/include/m16c/irq.h @@ -228,12 +228,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of LR and SR used during signal processing. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/renesas/include/rx65n/irq.h b/arch/renesas/include/rx65n/irq.h index 649af4ea435..42c5f62dd08 100644 --- a/arch/renesas/include/rx65n/irq.h +++ b/arch/renesas/include/rx65n/irq.h @@ -986,12 +986,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of LR and SR used during signal processing. */ uint32_t saved_pc; diff --git a/arch/renesas/include/sh1/irq.h b/arch/renesas/include/sh1/irq.h index 6ce374cf680..2f45b100bf8 100644 --- a/arch/renesas/include/sh1/irq.h +++ b/arch/renesas/include/sh1/irq.h @@ -449,12 +449,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of LR and SR used during signal processing. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/renesas/src/m16c/m16c_schedulesigaction.c b/arch/renesas/src/m16c/m16c_schedulesigaction.c index 8217b0e7d46..6f6d879c2c6 100644 --- a/arch/renesas/src/m16c/m16c_schedulesigaction.c +++ b/arch/renesas/src/m16c/m16c_schedulesigaction.c @@ -80,9 +80,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -101,7 +101,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/renesas/src/m16c/m16c_sigdeliver.c b/arch/renesas/src/m16c/m16c_sigdeliver.c index 52cd6703af3..9fe660a59e9 100644 --- a/arch/renesas/src/m16c/m16c_sigdeliver.c +++ b/arch/renesas/src/m16c/m16c_sigdeliver.c @@ -58,8 +58,8 @@ void renesas_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -75,7 +75,7 @@ void renesas_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)sig_rtcb->xcp.sigdeliver)(rtcb); + (sig_rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -95,10 +95,10 @@ void renesas_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_PC] = rtcb->xcp.saved_pc[0]; - regs[REG_PC + 1] = rtcb->xcp.saved_pc[1]; - regs[REG_FLG] = rtcb->xcp.saved_flg; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_PC] = rtcb->xcp.saved_pc[0]; + regs[REG_PC + 1] = rtcb->xcp.saved_pc[1]; + regs[REG_FLG] = rtcb->xcp.saved_flg; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/renesas/src/rx65n/rx65n_schedulesigaction.c b/arch/renesas/src/rx65n/rx65n_schedulesigaction.c index 7798d47258d..3956a418448 100644 --- a/arch/renesas/src/rx65n/rx65n_schedulesigaction.c +++ b/arch/renesas/src/rx65n/rx65n_schedulesigaction.c @@ -80,9 +80,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -101,7 +101,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/renesas/src/rx65n/rx65n_sigdeliver.c b/arch/renesas/src/rx65n/rx65n_sigdeliver.c index 5c8d50b1092..d18f632f461 100644 --- a/arch/renesas/src/rx65n/rx65n_sigdeliver.c +++ b/arch/renesas/src/rx65n/rx65n_sigdeliver.c @@ -60,8 +60,8 @@ void renesas_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -75,8 +75,8 @@ void renesas_sigdeliver(void) * signals. */ - sigdeliver = rtcb->xcp.sigdeliver; - rtcb->xcp.sigdeliver = NULL; + sigdeliver = rtcb->sigdeliver; + rtcb->sigdeliver = NULL; #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always diff --git a/arch/renesas/src/sh1/sh1_schedulesigaction.c b/arch/renesas/src/sh1/sh1_schedulesigaction.c index 8c020741f30..94b9c39dfbb 100644 --- a/arch/renesas/src/sh1/sh1_schedulesigaction.c +++ b/arch/renesas/src/sh1/sh1_schedulesigaction.c @@ -80,9 +80,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -101,7 +101,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/renesas/src/sh1/sh1_sigdeliver.c b/arch/renesas/src/sh1/sh1_sigdeliver.c index d32166906c4..48b2cc7f5d8 100644 --- a/arch/renesas/src/sh1/sh1_sigdeliver.c +++ b/arch/renesas/src/sh1/sh1_sigdeliver.c @@ -58,8 +58,8 @@ void renesas_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -75,7 +75,7 @@ void renesas_sigdeliver(void) /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -95,9 +95,9 @@ void renesas_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_PC] = rtcb->xcp.saved_pc; - regs[REG_SR] = rtcb->xcp.saved_sr; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_PC] = rtcb->xcp.saved_pc; + regs[REG_SR] = rtcb->xcp.saved_sr; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/risc-v/include/irq.h b/arch/risc-v/include/irq.h index 40f6275fd91..bbae16033e6 100644 --- a/arch/risc-v/include/irq.h +++ b/arch/risc-v/include/irq.h @@ -567,12 +567,6 @@ struct xcptcontext { - /* The following function pointer is non-NULL if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These additional register save locations are used to implement the * signal delivery trampoline. * diff --git a/arch/risc-v/src/common/riscv_schedulesigaction.c b/arch/risc-v/src/common/riscv_schedulesigaction.c index cb4263e8bd1..2b5fe178fba 100644 --- a/arch/risc-v/src/common/riscv_schedulesigaction.c +++ b/arch/risc-v/src/common/riscv_schedulesigaction.c @@ -84,9 +84,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -99,7 +99,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/risc-v/src/common/riscv_sigdeliver.c b/arch/risc-v/src/common/riscv_sigdeliver.c index a9d63a66b3c..3d8e8f88415 100644 --- a/arch/risc-v/src/common/riscv_sigdeliver.c +++ b/arch/risc-v/src/common/riscv_sigdeliver.c @@ -69,8 +69,8 @@ void riscv_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -102,7 +102,7 @@ retry: /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -147,7 +147,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index 1b2d31b0242..af25d57f5d5 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -51,7 +51,6 @@ struct xcptcontext { - void *sigdeliver; /* Actual type is sig_deliver_t */ jmp_buf regs; }; diff --git a/arch/sim/src/sim/sim_schedulesigaction.c b/arch/sim/src/sim/sim_schedulesigaction.c index 4e6ab46831f..c485dc538d3 100644 --- a/arch/sim/src/sim/sim_schedulesigaction.c +++ b/arch/sim/src/sim/sim_schedulesigaction.c @@ -83,13 +83,13 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) flags = enter_critical_section(); - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; if (tcb == this_task()) { sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } } diff --git a/arch/sim/src/sim/sim_sigdeliver.c b/arch/sim/src/sim/sim_sigdeliver.c index eca8c3bf910..238599c7570 100644 --- a/arch/sim/src/sim/sim_sigdeliver.c +++ b/arch/sim/src/sim/sim_sigdeliver.c @@ -61,7 +61,7 @@ void sim_sigdeliver(void) int16_t saved_irqcount; irqstate_t flags; #endif - if (NULL == (rtcb->xcp.sigdeliver)) + if (NULL == (rtcb->sigdeliver)) { return; } @@ -75,8 +75,8 @@ void sim_sigdeliver(void) #endif sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* NOTE: we do not save the return state for sim */ @@ -103,7 +103,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -135,7 +135,7 @@ retry: /* Allows next handler to be scheduled */ - rtcb->xcp.sigdeliver = NULL; + rtcb->sigdeliver = NULL; /* NOTE: we leave a critical section here for sim */ diff --git a/arch/sparc/include/sparc_v8/irq.h b/arch/sparc/include/sparc_v8/irq.h index fa5c77b362e..527f756a7c4 100644 --- a/arch/sparc/include/sparc_v8/irq.h +++ b/arch/sparc/include/sparc_v8/irq.h @@ -427,12 +427,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-NULL if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These additional register save locations are used to implement the * signal delivery trampoline. * diff --git a/arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c b/arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c index 2f50eb39722..aa78155e812 100644 --- a/arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c @@ -84,9 +84,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -105,7 +105,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the @@ -193,9 +193,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -219,7 +219,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: The task that needs to receive the signal is running. diff --git a/arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c b/arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c index 06fa3c5b777..69caac640ec 100644 --- a/arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c @@ -77,8 +77,8 @@ void sparc_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -114,7 +114,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -163,10 +163,10 @@ retry: * could be modified by a hostile program. */ - regs[REG_PC] = rtcb->xcp.saved_pc; - regs[REG_NPC] = rtcb->xcp.saved_npc; - regs[REG_PSR] = rtcb->xcp.saved_status; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_PC] = rtcb->xcp.saved_pc; + regs[REG_NPC] = rtcb->xcp.saved_npc; + regs[REG_PSR] = rtcb->xcp.saved_status; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ #ifdef CONFIG_SMP /* Restore the saved 'irqcount' and recover the critical section diff --git a/arch/tricore/include/tc3xx/irq.h b/arch/tricore/include/tc3xx/irq.h index 7b0394fd4e6..39b35ba97ae 100644 --- a/arch/tricore/include/tc3xx/irq.h +++ b/arch/tricore/include/tc3xx/irq.h @@ -116,12 +116,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of the context used during * signal processing. */ diff --git a/arch/tricore/src/common/tricore_schedulesigaction.c b/arch/tricore/src/common/tricore_schedulesigaction.c index 7b82a95746c..ef9eae0135c 100644 --- a/arch/tricore/src/common/tricore_schedulesigaction.c +++ b/arch/tricore/src/common/tricore_schedulesigaction.c @@ -80,9 +80,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -99,7 +99,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the diff --git a/arch/tricore/src/common/tricore_sigdeliver.c b/arch/tricore/src/common/tricore_sigdeliver.c index 9888597b9b7..e06ac8d046b 100644 --- a/arch/tricore/src/common/tricore_sigdeliver.c +++ b/arch/tricore/src/common/tricore_sigdeliver.c @@ -59,8 +59,8 @@ void tricore_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: @@ -74,7 +74,7 @@ retry: /* Deliver the signal */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -106,7 +106,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of * execution. diff --git a/arch/x86/include/i486/irq.h b/arch/x86/include/i486/irq.h index ce6c58bade1..144618fa464 100644 --- a/arch/x86/include/i486/irq.h +++ b/arch/x86/include/i486/irq.h @@ -151,12 +151,6 @@ #ifndef __ASSEMBLY__ struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of instruction pointer and EFLAGS used during * signal processing. * diff --git a/arch/x86/src/i486/i486_schedulesigaction.c b/arch/x86/src/i486/i486_schedulesigaction.c index 30770529ece..1638583d53e 100644 --- a/arch/x86/src/i486/i486_schedulesigaction.c +++ b/arch/x86/src/i486/i486_schedulesigaction.c @@ -76,9 +76,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -97,7 +97,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task diff --git a/arch/x86/src/i486/i486_sigdeliver.c b/arch/x86/src/i486/i486_sigdeliver.c index 9ddf0ace415..48ef0014680 100644 --- a/arch/x86/src/i486/i486_sigdeliver.c +++ b/arch/x86/src/i486/i486_sigdeliver.c @@ -59,8 +59,8 @@ void x86_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -76,7 +76,7 @@ void x86_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -96,9 +96,9 @@ void x86_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_EIP] = rtcb->xcp.saved_eip; - regs[REG_EFLAGS] = rtcb->xcp.saved_eflags; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_EIP] = rtcb->xcp.saved_eip; + regs[REG_EFLAGS] = rtcb->xcp.saved_eflags; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/x86_64/include/intel64/irq.h b/arch/x86_64/include/intel64/irq.h index 78ebfa4135a..f4831c05b91 100644 --- a/arch/x86_64/include/intel64/irq.h +++ b/arch/x86_64/include/intel64/irq.h @@ -495,12 +495,6 @@ enum ioapic_trigger_mode struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of instruction pointer and EFLAGS used during * signal processing. */ diff --git a/arch/x86_64/src/intel64/intel64_schedulesigaction.c b/arch/x86_64/src/intel64/intel64_schedulesigaction.c index 03b5ecae193..2923c75d1ee 100644 --- a/arch/x86_64/src/intel64/intel64_schedulesigaction.c +++ b/arch/x86_64/src/intel64/intel64_schedulesigaction.c @@ -78,9 +78,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -99,7 +99,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task @@ -178,9 +178,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -205,7 +205,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: The task that needs to receive the signal is running. diff --git a/arch/x86_64/src/intel64/intel64_sigdeliver.c b/arch/x86_64/src/intel64/intel64_sigdeliver.c index a7f5763b424..5701291820e 100644 --- a/arch/x86_64/src/intel64/intel64_sigdeliver.c +++ b/arch/x86_64/src/intel64/intel64_sigdeliver.c @@ -69,8 +69,8 @@ void x86_64_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Align regs to 64 byte boundary for XSAVE */ @@ -113,7 +113,7 @@ void x86_64_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -138,10 +138,10 @@ void x86_64_sigdeliver(void) * could be modified by a hostile program. */ - regs[REG_RIP] = rtcb->xcp.saved_rip; - regs[REG_RSP] = rtcb->xcp.saved_rsp; - regs[REG_RFLAGS] = rtcb->xcp.saved_rflags; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[REG_RIP] = rtcb->xcp.saved_rip; + regs[REG_RSP] = rtcb->xcp.saved_rsp; + regs[REG_RFLAGS] = rtcb->xcp.saved_rflags; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ #ifdef CONFIG_SMP /* Restore the saved 'irqcount' and recover the critical section diff --git a/arch/xtensa/include/irq.h b/arch/xtensa/include/irq.h index 1d299f428e9..ef681ab5812 100644 --- a/arch/xtensa/include/irq.h +++ b/arch/xtensa/include/irq.h @@ -178,12 +178,6 @@ struct xcpt_syscall_s struct xcptcontext { - /* The following function pointer is non-zero if there are pending signals - * to be processed. - */ - - void *sigdeliver; /* Actual type is sig_deliver_t */ - /* These are saved copies of registers used during signal processing. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/xtensa/src/common/xtensa_schedsigaction.c b/arch/xtensa/src/common/xtensa_schedsigaction.c index 591c70ade2c..e021f14ca1d 100644 --- a/arch/xtensa/src/common/xtensa_schedsigaction.c +++ b/arch/xtensa/src/common/xtensa_schedsigaction.c @@ -84,9 +84,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to task that is currently executing on any CPU. @@ -99,7 +99,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } else { diff --git a/arch/xtensa/src/common/xtensa_sigdeliver.c b/arch/xtensa/src/common/xtensa_sigdeliver.c index 97c4f3ded93..3ea04d30991 100644 --- a/arch/xtensa/src/common/xtensa_sigdeliver.c +++ b/arch/xtensa/src/common/xtensa_sigdeliver.c @@ -68,8 +68,8 @@ void xtensa_sig_deliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); retry: #ifdef CONFIG_SMP @@ -102,7 +102,7 @@ retry: /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -146,7 +146,7 @@ retry: * could be modified by a hostile program. */ - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/z16/include/z16f/irq.h b/arch/z16/include/z16f/irq.h index 4a2be42ed43..0782cefe397 100644 --- a/arch/z16/include/z16f/irq.h +++ b/arch/z16/include/z16f/irq.h @@ -165,12 +165,6 @@ struct xcptcontext uint16_t regs[XCPTCONTEXT_REGS]; - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - CODE void *sigdeliver; /* Actual type is sig_deliver_t */ - /* The following retains that state during signal execution. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/z16/src/common/z16_schedulesigaction.c b/arch/z16/src/common/z16_schedulesigaction.c index ca8f6bcb15b..3c063c4b83f 100644 --- a/arch/z16/src/common/z16_schedulesigaction.c +++ b/arch/z16/src/common/z16_schedulesigaction.c @@ -80,9 +80,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (!tcb->xcp.sigdeliver) + if (!tcb->sigdeliver) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is * being delivered to the currently executing task. @@ -101,7 +101,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted diff --git a/arch/z16/src/common/z16_sigdeliver.c b/arch/z16/src/common/z16_sigdeliver.c index 68e17b0afdb..f0d037c8d77 100644 --- a/arch/z16/src/common/z16_sigdeliver.c +++ b/arch/z16/src/common/z16_sigdeliver.c @@ -60,8 +60,8 @@ void z16_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -77,7 +77,7 @@ void z16_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -97,9 +97,9 @@ void z16_sigdeliver(void) * could be modified by a hostile program. */ - regs32[REG_PC / 2] = rtcb->xcp.saved_pc; - regs[REG_FLAGS] = rtcb->xcp.saved_i; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs32[REG_PC / 2] = rtcb->xcp.saved_pc; + regs[REG_FLAGS] = rtcb->xcp.saved_i; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/z80/include/ez80/irq.h b/arch/z80/include/ez80/irq.h index 351f6f94c19..83f3bed2ff5 100644 --- a/arch/z80/include/ez80/irq.h +++ b/arch/z80/include/ez80/irq.h @@ -246,12 +246,6 @@ struct xcptcontext chipreg_t regs[XCPTCONTEXT_REGS]; - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - CODE void *sigdeliver; /* Actual type is sig_deliver_t */ - /* The following retains that state during signal execution * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/z80/include/z180/irq.h b/arch/z80/include/z180/irq.h index 3fb3b25cd03..125422714a6 100644 --- a/arch/z80/include/z180/irq.h +++ b/arch/z80/include/z180/irq.h @@ -173,12 +173,6 @@ struct xcptcontext chipreg_t regs[XCPTCONTEXT_REGS]; - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - CODE void *sigdeliver; /* Actual type is sig_deliver_t */ - /* The following retains that state during signal execution * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/z80/include/z8/irq.h b/arch/z80/include/z8/irq.h index b50fe0f04cf..7faff99d001 100644 --- a/arch/z80/include/z8/irq.h +++ b/arch/z80/include/z8/irq.h @@ -304,12 +304,6 @@ struct xcptcontext chipreg_t regs[XCPTCONTEXT_REGS]; - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - CODE void *sigdeliver; /* Actual type is sig_deliver_t */ - /* The following retains that state during signal execution * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/z80/include/z80/irq.h b/arch/z80/include/z80/irq.h index 861fbb28225..e0308d9707f 100644 --- a/arch/z80/include/z80/irq.h +++ b/arch/z80/include/z80/irq.h @@ -88,12 +88,6 @@ struct xcptcontext chipreg_t regs[XCPTCONTEXT_REGS]; - /* The following function pointer is non-zero if there - * are pending signals to be processed. - */ - - CODE void *sigdeliver; /* Actual type is sig_deliver_t */ - /* The following retains that state during signal execution. * * REVISIT: Because there is only one copy of these save areas, diff --git a/arch/z80/src/ez80/ez80_schedulesigaction.c b/arch/z80/src/ez80/ez80_schedulesigaction.c index d0d0be93b9b..214a3e49f66 100644 --- a/arch/z80/src/ez80/ez80_schedulesigaction.c +++ b/arch/z80/src/ez80/ez80_schedulesigaction.c @@ -105,9 +105,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -124,7 +124,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task diff --git a/arch/z80/src/ez80/ez80_sigdeliver.c b/arch/z80/src/ez80/ez80_sigdeliver.c index cff88ad2e3a..3047267075c 100644 --- a/arch/z80/src/ez80/ez80_sigdeliver.c +++ b/arch/z80/src/ez80/ez80_sigdeliver.c @@ -61,8 +61,8 @@ void z80_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -78,7 +78,7 @@ void z80_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -98,9 +98,9 @@ void z80_sigdeliver(void) * could be modified by a hostile program. */ - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_I] = rtcb->xcp.saved_i; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[XCPT_PC] = rtcb->xcp.saved_pc; + regs[XCPT_I] = rtcb->xcp.saved_i; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Modify the saved return state with the actual saved values in the * TCB. This depends on the fact that nested signal handling is diff --git a/arch/z80/src/z180/z180_schedulesigaction.c b/arch/z80/src/z180/z180_schedulesigaction.c index 21f40053b5c..a72aa770f20 100644 --- a/arch/z80/src/z180/z180_schedulesigaction.c +++ b/arch/z80/src/z180/z180_schedulesigaction.c @@ -108,9 +108,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -127,7 +127,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task diff --git a/arch/z80/src/z180/z180_sigdeliver.c b/arch/z80/src/z180/z180_sigdeliver.c index 10979e65154..7bebc5e4c60 100644 --- a/arch/z80/src/z180/z180_sigdeliver.c +++ b/arch/z80/src/z180/z180_sigdeliver.c @@ -58,8 +58,8 @@ void z80_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -75,7 +75,7 @@ void z80_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -95,9 +95,9 @@ void z80_sigdeliver(void) * could be modified by a hostile program. */ - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_I] = rtcb->xcp.saved_i; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[XCPT_PC] = rtcb->xcp.saved_pc; + regs[XCPT_I] = rtcb->xcp.saved_i; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/z80/src/z8/z8_schedulesigaction.c b/arch/z80/src/z8/z8_schedulesigaction.c index b018bbe3aac..8731db67d29 100644 --- a/arch/z80/src/z8/z8_schedulesigaction.c +++ b/arch/z80/src/z8/z8_schedulesigaction.c @@ -105,9 +105,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -124,7 +124,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task diff --git a/arch/z80/src/z8/z8_sigdeliver.c b/arch/z80/src/z8/z8_sigdeliver.c index 3c93c08536b..2c13db2e0c0 100644 --- a/arch/z80/src/z8/z8_sigdeliver.c +++ b/arch/z80/src/z8/z8_sigdeliver.c @@ -77,8 +77,8 @@ void z80_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -94,7 +94,7 @@ void z80_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -114,9 +114,9 @@ void z80_sigdeliver(void) * could be modified by a hostile program. */ - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_IRQCTL] = rtcb->xcp.saved_irqctl; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[XCPT_PC] = rtcb->xcp.saved_pc; + regs[XCPT_IRQCTL] = rtcb->xcp.saved_irqctl; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/arch/z80/src/z80/z80_schedulesigaction.c b/arch/z80/src/z80/z80_schedulesigaction.c index 4bfba686db8..2a3a0168595 100644 --- a/arch/z80/src/z80/z80_schedulesigaction.c +++ b/arch/z80/src/z80/z80_schedulesigaction.c @@ -106,9 +106,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* Refuse to handle nested signal actions */ - if (tcb->xcp.sigdeliver == NULL) + if (tcb->sigdeliver == NULL) { - tcb->xcp.sigdeliver = sigdeliver; + tcb->sigdeliver = sigdeliver; /* First, handle some special cases when the signal is being delivered * to the currently executing task. @@ -125,7 +125,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) /* In this case just deliver the signal now. */ sigdeliver(tcb); - tcb->xcp.sigdeliver = NULL; + tcb->sigdeliver = NULL; } /* CASE 2: We are in an interrupt handler AND the interrupted task diff --git a/arch/z80/src/z80/z80_sigdeliver.c b/arch/z80/src/z80/z80_sigdeliver.c index 3d793cadc7d..ce2a6d9cbba 100644 --- a/arch/z80/src/z80/z80_sigdeliver.c +++ b/arch/z80/src/z80/z80_sigdeliver.c @@ -58,8 +58,8 @@ void z80_sigdeliver(void) board_autoled_on(LED_SIGNAL); sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); - DEBUGASSERT(rtcb->xcp.sigdeliver != NULL); + rtcb, rtcb->sigdeliver, rtcb->sigpendactionq.head); + DEBUGASSERT(rtcb->sigdeliver != NULL); /* Save the return state on the stack. */ @@ -75,7 +75,7 @@ void z80_sigdeliver(void) /* Deliver the signals */ - ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); + (rtcb->sigdeliver)(rtcb); /* Output any debug messages BEFORE restoring errno (because they may * alter errno), then disable interrupts again and restore the original @@ -95,9 +95,9 @@ void z80_sigdeliver(void) * could be modified by a hostile program. */ - regs[XCPT_PC] = rtcb->xcp.saved_pc; - regs[XCPT_I] = rtcb->xcp.saved_i; - rtcb->xcp.sigdeliver = NULL; /* Allows next handler to be scheduled */ + regs[XCPT_PC] = rtcb->xcp.saved_pc; + regs[XCPT_I] = rtcb->xcp.saved_i; + rtcb->sigdeliver = NULL; /* Allows next handler to be scheduled */ /* Then restore the correct state for this thread of execution. */ diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index b358be603b5..a285572d7ac 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -103,7 +103,6 @@ * Public Types ****************************************************************************/ -typedef CODE void (*sig_deliver_t)(FAR struct tcb_s *tcb); typedef CODE void (*phy_enable_t)(bool enable); typedef CODE void (*initializer_t)(void); typedef CODE void (*debug_callback_t)(int type, FAR void *addr, size_t size, diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 10d7904aefe..3103c715f10 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -299,6 +299,7 @@ typedef enum tstate_e tstate_t; /* The following is the form of a thread start-up function */ typedef CODE void (*start_t)(void); +typedef CODE void (*sig_deliver_t)(FAR struct tcb_s *tcb); /* This is the entry point into the main thread of the task or into a created * pthread within the task. @@ -716,6 +717,11 @@ struct tcb_s struct xcptcontext xcp; /* Interrupt register save area */ + /* The following function pointer is non-zero if there are pending signals + * to be processed. + */ + + sig_deliver_t sigdeliver; #if CONFIG_TASK_NAME_SIZE > 0 char name[CONFIG_TASK_NAME_SIZE + 1]; /* Task name (with NUL terminator) */ #endif