summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-11-02 17:21:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-11-02 17:21:16 +0000
commit209e68dfbd14d215f5bc78a4211ec61b079defa0 (patch)
tree36957872c10a6cd02a1db7c354e8beca73041a28
parent925563f410e0ee9b33e4e49eebfac7900bd2a22e (diff)
downloadrtems-209e68dfbd14d215f5bc78a4211ec61b079defa0.tar.bz2
2004-11-02 Joel Sherrill <joel@OARcorp.com>
* posix/src/mqueueunlink.c, posix/src/semunlink.c, score/inline/rtems/score/object.inl, score/macros/rtems/score/object.inl: _Objects_Is_local_id() should be avoided in single CPU configurations but always available in the Objects Handlers API.
-rw-r--r--cpukit/ChangeLog8
-rw-r--r--cpukit/posix/src/mqueueunlink.c2
-rw-r--r--cpukit/posix/src/semunlink.c2
-rw-r--r--cpukit/score/inline/rtems/score/object.inl7
-rw-r--r--cpukit/score/macros/rtems/score/object.inl3
5 files changed, 20 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 80faba4e00..b2b1c96e62 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,11 @@
+2004-11-02 Joel Sherrill <joel@OARcorp.com>
+
+ * posix/src/mqueueunlink.c, posix/src/semunlink.c,
+ score/inline/rtems/score/object.inl,
+ score/macros/rtems/score/object.inl: _Objects_Is_local_id() should be
+ avoided in single CPU configurations but always available in the
+ Objects Handlers API.
+
2004-11-02 Ralf Corsepius <ralf_corsepiu@rtems.org>
* rtems/include/rtems.h,
diff --git a/cpukit/posix/src/mqueueunlink.c b/cpukit/posix/src/mqueueunlink.c
index 3a14983226..9f27cb6b61 100644
--- a/cpukit/posix/src/mqueueunlink.c
+++ b/cpukit/posix/src/mqueueunlink.c
@@ -58,10 +58,12 @@ int mq_unlink(
* Don't support unlinking a remote message queue.
*/
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id(the_mq_id) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
+#endif
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
&_POSIX_Message_queue_Information,
diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c
index b694ea19f9..53475f1527 100644
--- a/cpukit/posix/src/semunlink.c
+++ b/cpukit/posix/src/semunlink.c
@@ -50,10 +50,12 @@ int sem_unlink(
* Don't support unlinking a remote semaphore.
*/
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id((Objects_Id)the_semaphore_id) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
+#endif
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
&_POSIX_Semaphore_Information,
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
index 647b7f9a66..8056c30db7 100644
--- a/cpukit/score/inline/rtems/score/object.inl
+++ b/cpukit/score/inline/rtems/score/object.inl
@@ -150,14 +150,17 @@ RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_node(
* FALSE otherwise.
*/
-#if defined(RTEMS_MULTIPROCESSING)
RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_id(
Objects_Id id
)
{
+#if defined(RTEMS_MULTIPROCESSING)
return _Objects_Is_local_node( _Objects_Get_node(id) );
-}
+#else
+ return TRUE;
#endif
+}
+
/*PAGE
*
diff --git a/cpukit/score/macros/rtems/score/object.inl b/cpukit/score/macros/rtems/score/object.inl
index 3bddc856ac..8469e55feb 100644
--- a/cpukit/score/macros/rtems/score/object.inl
+++ b/cpukit/score/macros/rtems/score/object.inl
@@ -93,6 +93,9 @@
#if defined(RTEMS_MULTIPROCESSING)
#define _Objects_Is_local_id( _id ) \
_Objects_Is_local_node( _Objects_Get_node(_id) )
+#else
+#define _Objects_Is_local_id( _id ) \
+ TRUE
#endif
/*PAGE