summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/corerwlockrelease.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-23 10:01:31 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-29 07:26:42 +0200
commit1e1a91ed11458ddbb27b94d0001d8f0fc2ef7a97 (patch)
tree5e7cb0e88da11528eb7fb4bae9148564c949d066 /cpukit/score/src/corerwlockrelease.c
parentlibcpu/m68k/mcf5272/clock/ckinit.c: Fix warning by including <rtems/clockdrv.h> (diff)
downloadrtems-1e1a91ed11458ddbb27b94d0001d8f0fc2ef7a97.tar.bz2
score: Remove Thread_queue_Queue::operations field
Remove the Thread_queue_Queue::operations field to reduce the size of this structure. Add a thread queue operations parameter to the _Thread_queue_First(), _Thread_queue_First_locked(), _Thread_queue_Enqueue(), _Thread_queue_Dequeue() and _Thread_queue_Flush() functions. This is a preparation patch to reduce the size of several synchronization objects.
Diffstat (limited to 'cpukit/score/src/corerwlockrelease.c')
-rw-r--r--cpukit/score/src/corerwlockrelease.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpukit/score/src/corerwlockrelease.c b/cpukit/score/src/corerwlockrelease.c
index bd39213c87..36fcf76088 100644
--- a/cpukit/score/src/corerwlockrelease.c
+++ b/cpukit/score/src/corerwlockrelease.c
@@ -64,7 +64,10 @@ CORE_RWLock_Status _CORE_RWLock_Release(
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
_ISR_Enable( level );
- next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
+ next = _Thread_queue_Dequeue(
+ &the_rwlock->Wait_queue,
+ CORE_RWLOCK_TQ_OPERATIONS
+ );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
@@ -82,7 +85,10 @@ CORE_RWLock_Status _CORE_RWLock_Release(
* Now see if more readers can be let go.
*/
while ( 1 ) {
- next = _Thread_queue_First( &the_rwlock->Wait_queue );
+ next = _Thread_queue_First(
+ &the_rwlock->Wait_queue,
+ CORE_RWLOCK_TQ_OPERATIONS
+ );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;