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/semaphore.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/semaphore.c')
-rw-r--r-- | cpukit/score/src/semaphore.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpukit/score/src/semaphore.c b/cpukit/score/src/semaphore.c index 4e70b79a6a..3d0d5f53ab 100644 --- a/cpukit/score/src/semaphore.c +++ b/cpukit/score/src/semaphore.c @@ -110,18 +110,19 @@ void _Semaphore_Wait( struct _Semaphore_Control *_sem ) void _Semaphore_Post( struct _Semaphore_Control *_sem ) { - Semaphore_Control *sem; - ISR_lock_Context lock_context; - Thread_queue_Heads *heads; + Semaphore_Control *sem; + Thread_queue_Context queue_context; + Thread_queue_Heads *heads; sem = _Semaphore_Get( _sem ); - _Semaphore_Queue_acquire( sem, &lock_context ); + _Thread_queue_Context_initialize( &queue_context, NULL ); + _Semaphore_Queue_acquire( sem, &queue_context.Lock_context ); heads = sem->Queue.Queue.heads; if ( heads == NULL ) { _Assert( sem->count < UINT_MAX ); ++sem->count; - _Semaphore_Queue_release( sem, &lock_context ); + _Semaphore_Queue_release( sem, &queue_context.Lock_context ); } else { const Thread_queue_Operations *operations; Thread_Control *first; @@ -133,8 +134,7 @@ void _Semaphore_Post( struct _Semaphore_Control *_sem ) &sem->Queue.Queue, operations, first, - NULL, - &lock_context + &queue_context ); } } |