diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-23 11:40:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-25 12:43:54 +0200 |
commit | 631b3c8967a329cdd53e54365e4e4c0aa93a4251 (patch) | |
tree | 3a750b145a90c90aa86222c26ee68aeb8c87a417 /cpukit/score/src/corebarrierwait.c | |
parent | score: Get rid of mp_id parameter (diff) | |
download | rtems-631b3c8967a329cdd53e54365e4e4c0aa93a4251.tar.bz2 |
score: Move thread queue MP callout to context
Drop the multiprocessing (MP) dependent callout parameter from the
thread queue extract, dequeue, flush and unblock methods. Merge this
parameter with the lock context into new structure Thread_queue_Context.
This helps to gets rid of the conditionally compiled method call
helpers.
Diffstat (limited to 'cpukit/score/src/corebarrierwait.c')
-rw-r--r-- | cpukit/score/src/corebarrierwait.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c index 54e90965f0..33f1718a66 100644 --- a/cpukit/score/src/corebarrierwait.c +++ b/cpukit/score/src/corebarrierwait.c @@ -21,22 +21,19 @@ #include <rtems/score/corebarrierimpl.h> #include <rtems/score/statesimpl.h> -void _CORE_barrier_Do_seize( - CORE_barrier_Control *the_barrier, - Thread_Control *executing, - bool wait, - Watchdog_Interval timeout, -#if defined(RTEMS_MULTIPROCESSING) - Thread_queue_MP_callout mp_callout, -#endif - ISR_lock_Context *lock_context +void _CORE_barrier_Seize( + CORE_barrier_Control *the_barrier, + Thread_Control *executing, + bool wait, + Watchdog_Interval timeout, + Thread_queue_Context *queue_context ) { uint32_t number_of_waiting_threads; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; - _CORE_barrier_Acquire_critical( the_barrier, lock_context ); + _CORE_barrier_Acquire_critical( the_barrier, queue_context ); number_of_waiting_threads = the_barrier->number_of_waiting_threads; ++number_of_waiting_threads; @@ -46,7 +43,7 @@ void _CORE_barrier_Do_seize( && number_of_waiting_threads == the_barrier->Attributes.maximum_count ) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; - _CORE_barrier_Surrender( the_barrier, mp_callout, lock_context ); + _CORE_barrier_Surrender( the_barrier, queue_context ); } else { the_barrier->number_of_waiting_threads = number_of_waiting_threads; _Thread_queue_Enqueue_critical( @@ -56,7 +53,7 @@ void _CORE_barrier_Do_seize( STATES_WAITING_FOR_BARRIER, timeout, CORE_BARRIER_TIMEOUT, - lock_context + &queue_context->Lock_context ); } } |