diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-17 15:05:56 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-18 09:58:57 +0200 |
commit | 9728ef357fbc3eada1c503f9218778ac445042a5 (patch) | |
tree | 443cd71b8e7ef7efc95631592af86e610fc1238a /cpukit/posix/src/mutextranslatereturncode.c | |
parent | rtems: Convert to inline functions (diff) | |
download | rtems-9728ef357fbc3eada1c503f9218778ac445042a5.tar.bz2 |
posix: Convert to inline function
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/mutextranslatereturncode.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/cpukit/posix/src/mutextranslatereturncode.c b/cpukit/posix/src/mutextranslatereturncode.c index aa2fb80d96..29069a0112 100644 --- a/cpukit/posix/src/mutextranslatereturncode.c +++ b/cpukit/posix/src/mutextranslatereturncode.c @@ -18,14 +18,9 @@ #include "config.h" #endif -#include <pthread.h> -#include <errno.h> - -#include <rtems/system.h> -#include <rtems/score/coremutex.h> #include <rtems/posix/muteximpl.h> -static int _POSIX_Mutex_Return_codes[CORE_MUTEX_STATUS_LAST + 1] = { +const int _POSIX_Mutex_Return_codes[CORE_MUTEX_STATUS_LAST + 1] = { 0, /* CORE_MUTEX_STATUS_SUCCESSFUL */ EBUSY, /* CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT */ EDEADLK, /* CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED */ @@ -37,18 +32,3 @@ static int _POSIX_Mutex_Return_codes[CORE_MUTEX_STATUS_LAST + 1] = { #endif EINVAL /* CORE_MUTEX_STATUS_CEILING_VIOLATED */ }; - - -int _POSIX_Mutex_Translate_core_mutex_return_code( - CORE_mutex_Status the_mutex_status -) -{ - /* - * Internal consistency check for bad status from SuperCore - */ - #if defined(RTEMS_DEBUG) - if ( the_mutex_status > CORE_MUTEX_STATUS_LAST ) - return EINVAL; - #endif - return _POSIX_Mutex_Return_codes[the_mutex_status]; -} |