diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-23 10:01:31 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-29 07:26:42 +0200 |
commit | 1e1a91ed11458ddbb27b94d0001d8f0fc2ef7a97 (patch) | |
tree | 5e7cb0e88da11528eb7fb4bae9148564c949d066 /cpukit/rtems/src/semcreate.c | |
parent | libcpu/m68k/mcf5272/clock/ckinit.c: Fix warning by including <rtems/clockdrv.h> (diff) | |
download | rtems-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/rtems/src/semcreate.c')
-rw-r--r-- | cpukit/rtems/src/semcreate.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c index 5e93e02632..c8111fd269 100644 --- a/cpukit/rtems/src/semcreate.c +++ b/cpukit/rtems/src/semcreate.c @@ -62,7 +62,7 @@ rtems_status_code rtems_semaphore_create( { Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; - CORE_semaphore_Attributes the_semaphore_attr; + CORE_semaphore_Disciplines semaphore_discipline; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) @@ -139,15 +139,10 @@ rtems_status_code rtems_semaphore_create( * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { - /* - * This effectively disables limit checking. - */ - the_semaphore_attr.maximum_count = 0xFFFFFFFF; - if ( _Attributes_Is_priority( attribute_set ) ) - the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; + semaphore_discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else - the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; + semaphore_discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. @@ -157,7 +152,8 @@ rtems_status_code rtems_semaphore_create( _CORE_semaphore_Initialize( &the_semaphore->Core_control.semaphore, - &the_semaphore_attr, + semaphore_discipline, + 0xFFFFFFFF, count ); #if defined(RTEMS_SMP) |