From 6fd1bdb7af578933f1aa8fb981a29c61df5dcde4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 14 Mar 2014 11:53:43 +0100 Subject: rtems: Use thread action for signals --- cpukit/rtems/src/signalcatch.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'cpukit/rtems/src/signalcatch.c') diff --git a/cpukit/rtems/src/signalcatch.c b/cpukit/rtems/src/signalcatch.c index 67c78b55c7..1bbeea727f 100644 --- a/cpukit/rtems/src/signalcatch.c +++ b/cpukit/rtems/src/signalcatch.c @@ -18,20 +18,29 @@ #include "config.h" #endif -#include +#include #include #include #include #include #include +#include -static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) +void _Signal_Action_handler( + Thread_Control *executing, + Thread_Action *action, + Per_CPU_Control *cpu, + ISR_Level level +) { RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; + (void) action; + _Thread_Action_release_and_ISR_enable( cpu, level ); + api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) return; @@ -53,13 +62,8 @@ static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); - } -static API_extensions_Post_switch_control _RTEMS_signal_Post_switch = { - .hook = _RTEMS_signal_Post_switch_hook -}; - rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set @@ -76,8 +80,6 @@ rtems_status_code rtems_signal_catch( _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ - _API_extensions_Add_post_switch( &_RTEMS_signal_Post_switch ); - if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; asr->handler = asr_handler; -- cgit v1.2.3