From 2077ae4cc8e0a16f4cb117b88a0cf9b463c7980e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 23 Aug 2013 11:52:01 +0200 Subject: score: PR2140: _Thread_queue_Extract() Return if the executing context performed the extract operation since interrupts may interfere. --- cpukit/score/src/threadqextractpriority.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/threadqextractpriority.c') diff --git a/cpukit/score/src/threadqextractpriority.c b/cpukit/score/src/threadqextractpriority.c index 706f51e828..f314f75da9 100644 --- a/cpukit/score/src/threadqextractpriority.c +++ b/cpukit/score/src/threadqextractpriority.c @@ -43,7 +43,7 @@ * EXTRACT_PRIORITY */ -void _Thread_queue_Extract_priority_helper( +bool _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing @@ -62,7 +62,7 @@ void _Thread_queue_Extract_priority_helper( _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); - return; + return false; } /* @@ -103,7 +103,7 @@ void _Thread_queue_Extract_priority_helper( if ( requeuing ) { _ISR_Enable( level ); - return; + return true; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { @@ -119,4 +119,6 @@ void _Thread_queue_Extract_priority_helper( if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif + + return true; } -- cgit v1.2.3