diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-09 15:14:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-09 15:14:19 +0200 |
commit | 7bf9c8bea7063fb2053e59dd1af766de7345458a (patch) | |
tree | 30e85c907c58b403310225cd5de6cb0da882a101 /cpukit/score/src/threadqenqueue.c | |
parent | confdefs.h: Do not hide network file systems (diff) | |
download | rtems-7bf9c8bea7063fb2053e59dd1af766de7345458a.tar.bz2 |
score: Comment _Thread_queue_Enqueue_critical()
Diffstat (limited to '')
-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, |