diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-13 13:49:35 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-23 08:01:14 +0200 |
commit | e709aa8522788a45adc0adf22daac82c574fcae4 (patch) | |
tree | 0d98e853cde5065aac1fe4eda5517ac22d8445f9 /cpukit/score/include/rtems/score/threadqimpl.h | |
parent | score: Introduce Thread_queue_Heads (diff) | |
download | rtems-e709aa8522788a45adc0adf22daac82c574fcae4.tar.bz2 |
score: Move wait flag update to tq extract
This makes it possible to use _Thread_queue_Extract_locked() for barrier
operations which extract all threads on the queue in one critical
section.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadqimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadqimpl.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h index e1060e4e82..cf3aeed053 100644 --- a/cpukit/score/include/rtems/score/threadqimpl.h +++ b/cpukit/score/include/rtems/score/threadqimpl.h @@ -214,8 +214,16 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Enqueue( * @param[in] queue The actual thread queue. * @param[in] operations The thread queue operations. * @param[in] the_thread The thread to extract. + * + * @return Returns the unblock indicator for _Thread_queue_Unblock_critical(). + * True indicates, that this thread must be unblocked by the scheduler later in + * _Thread_queue_Unblock_critical(), and false otherwise. In case false is + * returned, then the thread queue enqueue procedure was interrupted. Thus it + * will unblock itself and the thread wait information is no longer accessible, + * since this thread may already block on another resource in an SMP + * configuration. */ -void _Thread_queue_Extract_locked( +bool _Thread_queue_Extract_locked( Thread_queue_Queue *queue, const Thread_queue_Operations *operations, Thread_Control *the_thread @@ -229,11 +237,14 @@ void _Thread_queue_Extract_locked( * thread queue lock is released and an unblock is necessary. Thread * dispatching is enabled once the sequence to unblock the thread is complete. * + * @param[in] unblock The unblock indicator returned by + * _Thread_queue_Extract_locked(). * @param[in] queue The actual thread queue. * @param[in] the_thread The thread to extract. * @param[in] lock_context The lock context of the lock acquire. */ void _Thread_queue_Unblock_critical( + bool unblock, Thread_queue_Queue *queue, Thread_Control *the_thread, ISR_lock_Context *lock_context |