[rtems commit] score: Fix thread queue race condition

Sebastian Huber sebh at rtems.org
Thu Apr 9 12:11:35 UTC 2015

Module:    rtems
Branch:    master
Commit:    41814fa648e2c8ab3fb2359e4617657e74590b38
Changeset: http://git.rtems.org/rtems/commit/?id=41814fa648e2c8ab3fb2359e4617657e74590b38

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Apr  9 13:54:17 2015 +0200

score: Fix thread queue race condition

On uni-processor configurations the change of the thread blocking state
in _Thread_queue_Requeue_priority() did no harm and was simply useless.
However on SMP configurations this resulted in invalid state changes
leading to a wrong resource ownership.


 cpukit/score/src/threadqenqueue.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index 21bdcdb..c059556 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -92,7 +92,6 @@ static void _Thread_queue_Requeue_priority(
   Thread_queue_Control *tq = context;
-  _Thread_queue_Enter_critical_section( tq );
   _RBTree_Extract( &tq->Queues.Priority, &the_thread->RBNode );

More information about the vc mailing list