diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-24 12:02:20 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-19 12:00:45 +0200 |
commit | cc366ec8c9ecaab838a745175a0d53a7a5db437e (patch) | |
tree | 330c714baf220f30a07ea57bd08c545a072a12d3 /cpukit/score/src/threadqops.c | |
parent | score: More thread queue operations (diff) | |
download | rtems-cc366ec8c9ecaab838a745175a0d53a7a5db437e.tar.bz2 |
score: New thread queue implementation
Use thread wait flags for synchronization. The enqueue operation is now
part of the initial critical section. This is the key change and
enables fine grained locking on SMP for objects using a thread queue
like semaphores and message queues.
Update #2273.
Diffstat (limited to 'cpukit/score/src/threadqops.c')
-rw-r--r-- | cpukit/score/src/threadqops.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/cpukit/score/src/threadqops.c b/cpukit/score/src/threadqops.c index 9958ed667c..2967a0efc3 100644 --- a/cpukit/score/src/threadqops.c +++ b/cpukit/score/src/threadqops.c @@ -55,16 +55,6 @@ static void _Thread_queue_FIFO_enqueue( ); } -static Thread_Control *_Thread_queue_FIFO_dequeue( - Thread_queue_Control *the_thread_queue -) -{ - Chain_Control *fifo = &the_thread_queue->Queues.Fifo; - - return _Chain_Is_empty( fifo ) ? - NULL : THREAD_CHAIN_NODE_TO_THREAD( _Chain_Get_first_unprotected( fifo ) ); -} - static void _Thread_queue_FIFO_extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread @@ -121,17 +111,6 @@ static void _Thread_queue_Priority_enqueue( ); } -static Thread_Control *_Thread_queue_Priority_dequeue( - Thread_queue_Control *the_thread_queue -) -{ - RBTree_Node *first; - - first = _RBTree_Get( &the_thread_queue->Queues.Priority, RBT_LEFT ); - - return first != NULL ? THREAD_RBTREE_NODE_TO_THREAD( first ) : NULL; -} - static void _Thread_queue_Priority_extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread @@ -168,7 +147,6 @@ const Thread_queue_Operations _Thread_queue_Operations_FIFO = { .priority_change = _Thread_queue_Do_nothing_priority_change, .initialize = _Thread_queue_FIFO_initialize, .enqueue = _Thread_queue_FIFO_enqueue, - .dequeue = _Thread_queue_FIFO_dequeue, .extract = _Thread_queue_FIFO_extract, .first = _Thread_queue_FIFO_first }; @@ -177,7 +155,6 @@ const Thread_queue_Operations _Thread_queue_Operations_priority = { .priority_change = _Thread_queue_Priority_priority_change, .initialize = _Thread_queue_Priority_initialize, .enqueue = _Thread_queue_Priority_enqueue, - .dequeue = _Thread_queue_Priority_dequeue, .extract = _Thread_queue_Priority_extract, .first = _Thread_queue_Priority_first }; |