diff options
Diffstat (limited to 'cpukit/score/src/threadqenqueue.c')
-rw-r--r-- | cpukit/score/src/threadqenqueue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index 1e95003aa7..8bd19058ff 100644 --- a/cpukit/score/src/threadqenqueue.c +++ b/cpukit/score/src/threadqenqueue.c @@ -92,6 +92,15 @@ void _Thread_queue_Enqueue_critical( ); } + /* + * At this point thread dispatching is disabled, however, we already released + * the thread queue lock. Thus, interrupts or threads on other processors + * may already changed our state with respect to the thread queue object. + * The request could be satisfied or timed out. This situation is indicated + * by the thread wait flags. Other parties must not modify our thread state + * as long as we are in the THREAD_QUEUE_INTEND_TO_BLOCK thread wait state, + * thus we have to cancel the blocking operation ourself if necessary. + */ success = _Thread_Wait_flags_try_change( the_thread, THREAD_QUEUE_INTEND_TO_BLOCK, |