change log for rtems (2011-02-11)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Feb 11 21:11:03 UTC 2011


 *joel*:
2011-02-11	Joel Sherrill <joel.sherrilL at 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.

M 1.2709  cpukit/ChangeLog
M   1.21  cpukit/rtems/src/semtranslatereturncode.c
M   1.40  cpukit/score/include/rtems/score/coremutex.h
M   1.24  cpukit/score/src/coremutexsurrender.c
M   1.20  cpukit/score/src/objectinitializeinformation.c

diff -u rtems/cpukit/ChangeLog:1.2708 rtems/cpukit/ChangeLog:1.2709
--- rtems/cpukit/ChangeLog:1.2708	Fri Feb 11 09:38:31 2011
+++ rtems/cpukit/ChangeLog	Fri Feb 11 14:38:16 2011
@@ -1,5 +1,13 @@
 2011-02-11	Joel Sherrill <joel.sherrilL at 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.
+
+2011-02-11	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
 	* score/include/rtems/score/context.h: Spacing.
 
 2011-02-11	Ralf Corsépius <ralf.corsepius at rtems.org>

diff -u rtems/cpukit/rtems/src/semtranslatereturncode.c:1.20 rtems/cpukit/rtems/src/semtranslatereturncode.c:1.21
--- rtems/cpukit/rtems/src/semtranslatereturncode.c:1.20	Thu May 28 15:38:12 2009
+++ rtems/cpukit/rtems/src/semtranslatereturncode.c	Fri Feb 11 14:38:16 2011
@@ -64,11 +64,13 @@
 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)
   RTEMS_UNSATISFIED,        /* CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED */
+#endif
   RTEMS_NOT_OWNER_OF_RESOURCE, /* CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE */
   RTEMS_OBJECT_WAS_DELETED, /* CORE_MUTEX_WAS_DELETED */
   RTEMS_TIMEOUT,            /* CORE_MUTEX_TIMEOUT */
-#ifdef __RTEMS_STRICT_ORDER_MUTEX__
+#if !defined(__RTEMS_STRICT_ORDER_MUTEX__)
     CORE_MUTEX_RELEASE_NOT_ORDER,
 #endif
   RTEMS_INVALID_PRIORITY   /* CORE_MUTEX_STATUS_CEILING_VIOLATED */

diff -u rtems/cpukit/score/include/rtems/score/coremutex.h:1.39 rtems/cpukit/score/include/rtems/score/coremutex.h:1.40
--- rtems/cpukit/score/include/rtems/score/coremutex.h:1.39	Fri Nov 27 23:58:53 2009
+++ rtems/cpukit/score/include/rtems/score/coremutex.h	Fri Feb 11 14:38:16 2011
@@ -85,10 +85,12 @@
    *  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 @@
    */
   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 -u rtems/cpukit/score/src/coremutexsurrender.c:1.23 rtems/cpukit/score/src/coremutexsurrender.c:1.24
--- rtems/cpukit/score/src/coremutexsurrender.c:1.23	Thu Jul 15 10:44:40 2010
+++ rtems/cpukit/score/src/coremutexsurrender.c	Fri Feb 11 14:38:16 2011
@@ -137,9 +137,11 @@
       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 -u rtems/cpukit/score/src/objectinitializeinformation.c:1.19 rtems/cpukit/score/src/objectinitializeinformation.c:1.20
--- rtems/cpukit/score/src/objectinitializeinformation.c:1.19	Tue Aug 10 12:41:32 2010
+++ rtems/cpukit/score/src/objectinitializeinformation.c	Fri Feb 11 14:38:16 2011
@@ -128,13 +128,18 @@
 
   /*
    *  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 );



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110211/8ab02359/attachment-0001.html>


More information about the vc mailing list