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/corerwlockobtainwrite.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/corerwlockobtainwrite.c')
-rw-r--r-- | cpukit/score/src/corerwlockobtainwrite.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c index e1bb1bd14a..a7d1bb1b6a 100644 --- a/cpukit/score/src/corerwlockobtainwrite.c +++ b/cpukit/score/src/corerwlockobtainwrite.c @@ -24,11 +24,11 @@ #include <rtems/score/watchdog.h> void _CORE_RWLock_Seize_for_writing( - CORE_RWLock_Control *the_rwlock, - Thread_Control *executing, - bool wait, - Watchdog_Interval timeout, - ISR_lock_Context *lock_context + CORE_RWLock_Control *the_rwlock, + Thread_Control *executing, + bool wait, + Watchdog_Interval timeout, + Thread_queue_Context *queue_context ) { /* @@ -38,12 +38,12 @@ void _CORE_RWLock_Seize_for_writing( * If any thread is waiting, then we wait. */ - _CORE_RWLock_Acquire_critical( the_rwlock, lock_context ); + _CORE_RWLock_Acquire_critical( the_rwlock, queue_context ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; - _CORE_RWLock_Release( the_rwlock, lock_context ); + _CORE_RWLock_Release( the_rwlock, queue_context ); executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; @@ -57,7 +57,7 @@ void _CORE_RWLock_Seize_for_writing( */ if ( !wait ) { - _CORE_RWLock_Release( the_rwlock, lock_context ); + _CORE_RWLock_Release( the_rwlock, queue_context ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return; } @@ -76,6 +76,6 @@ void _CORE_RWLock_Seize_for_writing( STATES_WAITING_FOR_RWLOCK, timeout, CORE_RWLOCK_TIMEOUT, - lock_context + &queue_context->Lock_context ); } |