3737#include <arch/board/board.h>
3838
3939#include "sched/sched.h"
40+ #include "signal/signal.h"
4041#include "arm_internal.h"
4142
4243/****************************************************************************
@@ -59,9 +60,9 @@ void arm_sigdeliver(void)
5960
6061 board_autoled_on (LED_SIGNAL );
6162
62- sinfo ("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n" ,
63- rtcb , rtcb -> sigdeliver , rtcb -> sigpendactionq .head );
64- DEBUGASSERT (rtcb -> sigdeliver != NULL );
63+ sinfo ("rtcb=%p sigpendactionq.head=%p\n" ,
64+ rtcb , rtcb -> sigpendactionq .head );
65+ DEBUGASSERT (( rtcb -> flags & TCB_FLAG_SIGDELIVER ) != 0 );
6566
6667#ifndef CONFIG_SUPPRESS_INTERRUPTS
6768 /* Then make sure that interrupts are enabled. Signal handlers must always
@@ -73,7 +74,7 @@ void arm_sigdeliver(void)
7374
7475 /* Deliver the signal */
7576
76- ( rtcb -> sigdeliver ) (rtcb );
77+ nxsig_deliver (rtcb );
7778
7879 /* Output any debug messages BEFORE restoring errno (because they may
7980 * alter errno), then disable interrupts again and restore the original
@@ -93,7 +94,9 @@ void arm_sigdeliver(void)
9394 * could be modified by a hostile program.
9495 */
9596
96- rtcb -> sigdeliver = NULL ; /* Allows next handler to be scheduled */
97+ /* Allows next handler to be scheduled */
98+
99+ rtcb -> flags &= ~TCB_FLAG_SIGDELIVER ;
97100
98101 /* Then restore the correct state for this thread of execution. */
99102
0 commit comments