diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2007-12-19 19:13:54 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2007-12-19 19:13:54 +0000 |
commit | 030fee5b027110617286387f24b8993aa4976a09 (patch) | |
tree | c2b1c1eba62a91e76bdb2ca79a73270782658efb /cpukit/posix | |
parent | 2007-12-19 Jennifer Averett <jennifer.averett@OARcorp.com> (diff) | |
download | rtems-030fee5b027110617286387f24b8993aa4976a09.tar.bz2 |
2007-12-19 Jennifer Averett <jennifer.averett@OARcorp.com>
* posix/src/psignalunblockthread.c: Remove source that
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/src/psignalunblockthread.c | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c index f3abc3d759..980413ff74 100644 --- a/cpukit/posix/src/psignalunblockthread.c +++ b/cpukit/posix/src/psignalunblockthread.c @@ -80,18 +80,47 @@ boolean _POSIX_signals_Unblock_thread( return FALSE; } + /* + * Thread is not waiting due to a sigwait. + */ if ( ~api->signals_blocked & mask ) { + + /* + * The thread is interested in this signal. We are going + * to post it. We have a few broad cases: + * + If it is blocked on an interruptible signal, THEN + * we unblock the thread. + * + If it is in the ready state AND + * we are sending from an ISR AND + * it is the interrupted thread AND + * it is not blocked, THEN + * we need to dispatch at the end of this ISR. + * + Any other combination, do nothing. + */ + the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; - if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) - _Thread_queue_Extract_with_proxy( the_thread ); - else if ( _States_Is_delaying(the_thread->current_state)){ - if ( _Watchdog_Is_active( &the_thread->Timer ) ) - (void) _Watchdog_Remove( &the_thread->Timer ); - _Thread_Unblock( the_thread ); - } + /* + * At this time, there is no RTEMS API object which lets a task + * block on a thread queue and be interruptible by a POSIX signal. + * If an object class with that requirement is ever added, enable + * this code. + */ + #if 0 + if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) + _Thread_queue_Extract_with_proxy( the_thread ); + else + #endif + if ( _States_Is_delaying(the_thread->current_state) ){ + if ( _Watchdog_Is_active( &the_thread->Timer ) ) + (void) _Watchdog_Remove( &the_thread->Timer ); + _Thread_Unblock( the_thread ); + } + } else if ( the_thread->current_state == STATES_READY ) { + if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) + _ISR_Signals_to_thread_executing = TRUE; } } return FALSE; |