diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-02-11 20:38:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-02-11 20:38:16 +0000 |
commit | 2af90ff1a189d4ff80a06d8a547d0e87de7f4033 (patch) | |
tree | 429ae74d8dd98f53f243fed84457b508f84bec84 /cpukit/score | |
parent | 2011-02-11 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-2af90ff1a189d4ff80a06d8a547d0e87de7f4033.tar.bz2 |
2011-02-11 Joel Sherrill <joel.sherrilL@OARcorp.com>
* rtems/src/semtranslatereturncode.c,
score/include/rtems/score/coremutex.h,
score/src/coremutexsurrender.c,
score/src/objectinitializeinformation.c: Disable code not reachable
when POSIX is not enabled.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/coremutex.h | 4 | ||||
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 8 | ||||
-rw-r--r-- | cpukit/score/src/objectinitializeinformation.c | 13 |
3 files changed, 17 insertions, 8 deletions
diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h index c047347327..97c4e5c947 100644 --- a/cpukit/score/include/rtems/score/coremutex.h +++ b/cpukit/score/include/rtems/score/coremutex.h @@ -85,10 +85,12 @@ typedef enum { * resource was unavailable. */ CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT, +#if !defined(RTEMS_POSIX_API) /** This status indicates that an attempt was made to relock a mutex * for which nesting is not configured. */ CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED, +#endif /** This status indicates that an attempt was made to release a mutex * by a thread other than the thread which locked it. */ @@ -103,7 +105,7 @@ typedef enum { */ CORE_MUTEX_TIMEOUT, -#ifdef __RTEMS_STRICT_ORDER_MUTEX__ +#if !defined(__RTEMS_STRICT_ORDER_MUTEX__) /** This status indicates that a thread not release the mutex which has * the priority inheritance property in a right order. */ diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c index cfe40ab77d..66817dcc4d 100644 --- a/cpukit/score/src/coremutexsurrender.c +++ b/cpukit/score/src/coremutexsurrender.c @@ -137,9 +137,11 @@ CORE_mutex_Status _CORE_mutex_Surrender( switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: return CORE_MUTEX_STATUS_SUCCESSFUL; - case CORE_MUTEX_NESTING_IS_ERROR: - /* should never occur */ - return CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; + #if !defined(RTEMS_POSIX_API) + case CORE_MUTEX_NESTING_IS_ERROR: + /* should never occur */ + return CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; + #endif case CORE_MUTEX_NESTING_BLOCKS: /* Currently no API exercises this behavior. */ break; diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c index 771637c8ca..c8ef33e466 100644 --- a/cpukit/score/src/objectinitializeinformation.c +++ b/cpukit/score/src/objectinitializeinformation.c @@ -128,13 +128,18 @@ void _Objects_Initialize_information( /* * Calculate the maximum name length + * + * NOTE: Always 4 bytes long in Class so aligned. It is POSIX name + * lengths that may be an odd number of bytes. */ name_length = maximum_name_length; - if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) - name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & - ~(OBJECTS_NAME_ALIGNMENT-1); - + #if !defined(RTEMS_POSIX_API) + if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) + name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & + ~(OBJECTS_NAME_ALIGNMENT-1); + #endif + information->name_length = name_length; _Chain_Initialize_empty( &information->Inactive ); |