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/posix/src/semaphorecreatesupp.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/posix/src/semaphorecreatesupp.c')
-rw-r--r-- | cpukit/posix/src/semaphorecreatesupp.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c index e4187d697d..c527a9b46c 100644 --- a/cpukit/posix/src/semaphorecreatesupp.c +++ b/cpukit/posix/src/semaphorecreatesupp.c @@ -47,9 +47,8 @@ int _POSIX_Semaphore_Create_support( POSIX_Semaphore_Control **the_sem ) { - POSIX_Semaphore_Control *the_semaphore; - CORE_semaphore_Attributes *the_sem_attr; - char *name; + POSIX_Semaphore_Control *the_semaphore; + char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) @@ -86,8 +85,6 @@ int _POSIX_Semaphore_Create_support( the_semaphore->linked = false; } - the_sem_attr = &the_semaphore->Semaphore.Attributes; - /* * POSIX does not appear to specify what the discipline for * blocking tasks on this semaphore should be. It could somehow @@ -95,14 +92,12 @@ int _POSIX_Semaphore_Create_support( * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ - the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; - - /* - * This effectively disables limit checking. - */ - the_sem_attr->maximum_count = 0xFFFFFFFF; - - _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); + _CORE_semaphore_Initialize( + &the_semaphore->Semaphore, + CORE_SEMAPHORE_DISCIPLINES_FIFO, + 0xFFFFFFFF, + value + ); /* * Make the semaphore available for use. |