summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-02-14 20:21:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-02-14 20:21:31 +0000
commit261074795a65ea339fdcbdfd8499aa449a169ade (patch)
tree4bec1e8768408c3f8b1a4f9cb1d9d6c4e1200695
parent2011-02-14 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff)
downloadrtems-261074795a65ea339fdcbdfd8499aa449a169ade.tar.bz2
2011-02-14 Joel Sherrill <joel.sherrilL@OARcorp.com>
* rtems/src/semtranslatereturncode.c, score/src/coremutexsurrender.c: Now all conditionals have the correct sense and all tests pass.
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/rtems/src/semtranslatereturncode.c2
-rw-r--r--cpukit/score/src/coremutexsurrender.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index e335b6331b..96e255c014 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,10 @@
2011-02-14 Joel Sherrill <joel.sherrilL@OARcorp.com>
+ * rtems/src/semtranslatereturncode.c, score/src/coremutexsurrender.c:
+ Now all conditionals have the correct sense and all tests pass.
+
+2011-02-14 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
* score/include/rtems/score/coremutex.h,
score/inline/rtems/score/coremutex.inl, score/src/apimutexallocate.c:
Fix direction of conditional and eliminate use of nesting is error
diff --git a/cpukit/rtems/src/semtranslatereturncode.c b/cpukit/rtems/src/semtranslatereturncode.c
index 23c81dfe26..a5dd0edf47 100644
--- a/cpukit/rtems/src/semtranslatereturncode.c
+++ b/cpukit/rtems/src/semtranslatereturncode.c
@@ -64,7 +64,7 @@
const rtems_status_code _Semaphore_Translate_core_mutex_return_code_[] = {
RTEMS_SUCCESSFUL, /* CORE_MUTEX_STATUS_SUCCESSFUL */
RTEMS_UNSATISFIED, /* CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT */
-#if !defined(RTEMS_POSIX_API)
+#if defined(RTEMS_POSIX_API)
RTEMS_UNSATISFIED, /* CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED */
#endif
RTEMS_NOT_OWNER_OF_RESOURCE, /* CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE */
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 66817dcc4d..7e1a444215 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -137,7 +137,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
return CORE_MUTEX_STATUS_SUCCESSFUL;
- #if !defined(RTEMS_POSIX_API)
+ #if defined(RTEMS_POSIX_API)
case CORE_MUTEX_NESTING_IS_ERROR:
/* should never occur */
return CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;