2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>

* score/src/threadblockingoperationcancel.c: Clean up.
	* score/src/threadqextract.c: Restructure to eliminate dead code.
This commit is contained in:
Joel Sherrill
2008-01-23 13:07:13 +00:00
parent 9185d61c54
commit 6b8da2b989
3 changed files with 19 additions and 9 deletions
+5
View File
@@ -1,3 +1,8 @@
2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/threadblockingoperationcancel.c: Clean up.
* score/src/threadqextract.c: Restructure to eliminate dead code.
2008-01-22 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/src/eventsurrender.c, rtems/src/ratemonperiod.c,
@@ -53,13 +53,17 @@ void _Thread_blocking_operation_Cancel(
}
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
the_thread->Wait.queue = NULL;
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
+9 -8
View File
@@ -46,12 +46,13 @@ void _Thread_queue_Extract(
Thread_Control *the_thread
)
{
switch ( the_thread_queue->discipline ) {
case THREAD_QUEUE_DISCIPLINE_FIFO:
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
break;
case THREAD_QUEUE_DISCIPLINE_PRIORITY:
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
break;
}
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}