summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-20 21:39:56 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-30 16:16:21 +0200
commit2581a563f9182dc2debdba97f33feee6d797e53a (patch)
tree97883371771f9a2905d159d8e11c0b2e9da0408c /cpukit/posix
parentrtems: Simplify rtems_semaphore_delete() (diff)
downloadrtems-2581a563f9182dc2debdba97f33feee6d797e53a.tar.bz2
score: Add semaphore variants
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/include/rtems/posix/semaphoreimpl.h2
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c6
-rw-r--r--cpukit/posix/src/semaphoredeletesupp.c6
-rw-r--r--cpukit/posix/src/semaphorewaitsupp.c1
-rw-r--r--cpukit/posix/src/sempost.c1
5 files changed, 10 insertions, 6 deletions
diff --git a/cpukit/posix/include/rtems/posix/semaphoreimpl.h b/cpukit/posix/include/rtems/posix/semaphoreimpl.h
index 1521eade85..17d3f64e92 100644
--- a/cpukit/posix/include/rtems/posix/semaphoreimpl.h
+++ b/cpukit/posix/include/rtems/posix/semaphoreimpl.h
@@ -34,6 +34,8 @@ extern "C" {
*/
extern Objects_Information _POSIX_Semaphore_Information;
+#define POSIX_SEMAPHORE_TQ_OPERATIONS &_Thread_queue_Operations_FIFO
+
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *
_POSIX_Semaphore_Allocate_unprotected( void )
{
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c
index 79db8888d8..d66e1942c9 100644
--- a/cpukit/posix/src/semaphorecreatesupp.c
+++ b/cpukit/posix/src/semaphorecreatesupp.c
@@ -92,11 +92,7 @@ int _POSIX_Semaphore_Create_support(
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
- _CORE_semaphore_Initialize(
- &the_semaphore->Semaphore,
- CORE_SEMAPHORE_DISCIPLINES_FIFO,
- value
- );
+ _CORE_semaphore_Initialize( &the_semaphore->Semaphore, value );
/*
* Make the semaphore available for use.
diff --git a/cpukit/posix/src/semaphoredeletesupp.c b/cpukit/posix/src/semaphoredeletesupp.c
index 2d39b2aad5..325e4a6c1b 100644
--- a/cpukit/posix/src/semaphoredeletesupp.c
+++ b/cpukit/posix/src/semaphoredeletesupp.c
@@ -27,7 +27,11 @@ void _POSIX_Semaphore_Delete(
{
if ( !the_semaphore->linked && !the_semaphore->open_count ) {
_Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
- _CORE_semaphore_Destroy( &the_semaphore->Semaphore, queue_context );
+ _CORE_semaphore_Destroy(
+ &the_semaphore->Semaphore,
+ POSIX_SEMAPHORE_TQ_OPERATIONS,
+ queue_context
+ );
_POSIX_Semaphore_Free( the_semaphore );
} else {
_CORE_semaphore_Release( &the_semaphore->Semaphore, queue_context );
diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c
index d8e0d69654..9ba8d55894 100644
--- a/cpukit/posix/src/semaphorewaitsupp.c
+++ b/cpukit/posix/src/semaphorewaitsupp.c
@@ -43,6 +43,7 @@ int _POSIX_Semaphore_Wait_support(
status = _CORE_semaphore_Seize(
&the_semaphore->Semaphore,
+ POSIX_SEMAPHORE_TQ_OPERATIONS,
_Thread_Executing,
blocking,
timeout,
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
index 322663b5ad..da2b1a5495 100644
--- a/cpukit/posix/src/sempost.c
+++ b/cpukit/posix/src/sempost.c
@@ -40,6 +40,7 @@ int sem_post(
status = _CORE_semaphore_Surrender(
&the_semaphore->Semaphore,
+ POSIX_SEMAPHORE_TQ_OPERATIONS,
SEM_VALUE_MAX,
&queue_context
);