diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-23 13:07:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-23 13:07:13 +0000 |
commit | 6b8da2b989ea6077f06ab35a819fc60bbdf7ee70 (patch) | |
tree | 14f19f1286263de52d480c7793dc17c2c8b30e3a /cpukit/score/src/threadqextract.c | |
parent | 2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-6b8da2b989ea6077f06ab35a819fc60bbdf7ee70.tar.bz2 |
2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/threadblockingoperationcancel.c: Clean up.
* score/src/threadqextract.c: Restructure to eliminate dead code.
Diffstat (limited to 'cpukit/score/src/threadqextract.c')
-rw-r--r-- | cpukit/score/src/threadqextract.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cpukit/score/src/threadqextract.c b/cpukit/score/src/threadqextract.c index f971a7b970..21aa2c2a46 100644 --- a/cpukit/score/src/threadqextract.c +++ b/cpukit/score/src/threadqextract.c @@ -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 ); + } |