diff options
Diffstat (limited to 'cpukit/posix/src/sempost.c')
-rw-r--r-- | cpukit/posix/src/sempost.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c index f4633dcf70..322663b5ad 100644 --- a/cpukit/posix/src/sempost.c +++ b/cpukit/posix/src/sempost.c @@ -22,6 +22,7 @@ #include <limits.h> #include <rtems/posix/semaphoreimpl.h> +#include <rtems/posix/posixapi.h> int sem_post( sem_t *sem @@ -29,7 +30,7 @@ int sem_post( { POSIX_Semaphore_Control *the_semaphore; Thread_queue_Context queue_context; - CORE_semaphore_Status status; + Status_Control status; the_semaphore = _POSIX_Semaphore_Get( sem, &queue_context ); @@ -42,12 +43,5 @@ int sem_post( SEM_VALUE_MAX, &queue_context ); - - if ( status == CORE_SEMAPHORE_STATUS_SUCCESSFUL ) { - return 0; - } - - rtems_set_errno_and_return_minus_one( - _POSIX_Semaphore_Translate_core_semaphore_return_code( status ) - ); + return _POSIX_Zero_or_minus_one_plus_errno( status ); } |