diff options
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 ); } } |