summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semaphoretranslatereturncode.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-18 13:55:12 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:56:58 +0200
commitc624c0e9e219cd89b651021b45ee8b4e24ff8c19 (patch)
tree311d790efb9ed49d614612ef1b8587e60656bdcf /cpukit/posix/src/semaphoretranslatereturncode.c
parentposix: Create semaphore implementation header (diff)
downloadrtems-c624c0e9e219cd89b651021b45ee8b4e24ff8c19.tar.bz2
posix: Convert to inline function
Diffstat (limited to 'cpukit/posix/src/semaphoretranslatereturncode.c')
-rw-r--r--cpukit/posix/src/semaphoretranslatereturncode.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/cpukit/posix/src/semaphoretranslatereturncode.c b/cpukit/posix/src/semaphoretranslatereturncode.c
index c4e65580c7..143ce4f6dd 100644
--- a/cpukit/posix/src/semaphoretranslatereturncode.c
+++ b/cpukit/posix/src/semaphoretranslatereturncode.c
@@ -20,25 +20,9 @@
#include "config.h"
#endif
-#include <pthread.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/score/coresem.h>
#include <rtems/posix/semaphoreimpl.h>
-/*
- * _POSIX_Semaphore_Translate_core_semaphore_return_code
- *
- * Input parameters:
- * the_semaphore_status - semaphore status code to translate
- *
- * Output parameters:
- * status code - translated POSIX status code
- *
- */
-
-static int _POSIX_Semaphore_Return_codes[CORE_SEMAPHORE_STATUS_LAST + 1] = {
+const int _POSIX_Semaphore_Return_codes[CORE_SEMAPHORE_STATUS_LAST + 1] = {
0, /* CORE_SEMAPHORE_STATUS_SUCCESSFUL */
EAGAIN, /* CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT */
EAGAIN, /* CORE_SEMAPHORE_WAS_DELETED */
@@ -48,18 +32,3 @@ static int _POSIX_Semaphore_Return_codes[CORE_SEMAPHORE_STATUS_LAST + 1] = {
*/
ENOSYS, /* CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED */
};
-
-
-int _POSIX_Semaphore_Translate_core_semaphore_return_code(
- CORE_semaphore_Status the_semaphore_status
-)
-{
- /*
- * Internal consistency check for bad status from SuperCore
- */
- #if defined(RTEMS_DEBUG)
- if ( the_semaphore_status > CORE_SEMAPHORE_STATUS_LAST )
- return EINVAL;
- #endif
- return _POSIX_Semaphore_Return_codes[the_semaphore_status];
-}