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/src | |
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/src')
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 8 | ||||
-rw-r--r-- | cpukit/score/src/objectinitializeinformation.c | 13 |
2 files changed, 14 insertions, 7 deletions
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 ); |