diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-14 11:58:12 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-31 08:29:43 +0200 |
commit | fc521e2df6f4948da47ab26b90c4ce1ff56e3c19 (patch) | |
tree | 41727c47bd66803dcd9222c0bb835d0668447b4e /cpukit/posix/src/psignal.c | |
parent | rtems: Use thread action for signals (diff) | |
download | rtems-fc521e2df6f4948da47ab26b90c4ce1ff56e3c19.tar.bz2 |
posix: Use thread action for signals
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/psignal.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index 731a2300bd..0e2a018041 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -25,6 +25,7 @@ #include <rtems/score/isrlevel.h> #include <rtems/score/statesimpl.h> +#include <rtems/score/threadimpl.h> #include <rtems/score/threadqimpl.h> #include <rtems/score/watchdogimpl.h> #include <rtems/score/wkspace.h> @@ -108,22 +109,22 @@ Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ]; (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \ (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) -/* - * _POSIX_signals_Post_switch_extension - */ - -static void _POSIX_signals_Post_switch_hook( - Thread_Control *the_thread +void _POSIX_signals_Action_handler( + Thread_Control *executing, + Thread_Action *action, + Per_CPU_Control *cpu, + ISR_Level level ) { POSIX_API_Control *api; int signo; ISR_lock_Context lock_context; int hold_errno; - Thread_Control *executing; - executing = _Thread_Get_executing(); - api = the_thread->API_Extensions[ THREAD_API_POSIX ]; + (void) action; + _Thread_Action_release_and_ISR_enable( cpu, level ); + + api = executing->API_Extensions[ THREAD_API_POSIX ]; /* * We need to ensure that if the signal handler executes a call @@ -169,10 +170,6 @@ static void _POSIX_signals_Post_switch_hook( executing->Wait.return_code = hold_errno; } -API_extensions_Post_switch_control _POSIX_signals_Post_switch = { - .hook = _POSIX_signals_Post_switch_hook -}; - void _POSIX_signals_Manager_Initialization(void) { uint32_t signo; |