forked from Imagelibrary/rtems
2007-12-19 Jennifer Averett <jennifer.averett@OARcorp.com>
* posix/src/psignalunblockthread.c: Remove source that
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2007-12-19 Jennifer Averett <jennifer.averett@OARcorp.com>
|
||||
|
||||
* posix/src/psignalunblockthread.c: Remove source that
|
||||
|
||||
2007-12-19 Jennifer Averett <jennifer.averett@OARcorp.com>
|
||||
|
||||
* posix/src/psignalchecksignal.c: Make assert active during debug mode
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user