summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline/rtems/score/object.inl
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-21 21:28:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-21 21:28:05 +0000
commit27b7e81d91c545d3a35b0581ec4f9ae2eda90bb7 (patch)
tree66f90911c2ee4e10b6df270c8d99579e5cf3545d /cpukit/score/inline/rtems/score/object.inl
parent2008-12-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-27b7e81d91c545d3a35b0581ec4f9ae2eda90bb7.tar.bz2
2008-12-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/inline/rtems/score/object.inl, score/src/objectgetbyindex.c: Fix issues when using 16-bit object Ids.
Diffstat (limited to 'cpukit/score/inline/rtems/score/object.inl')
-rw-r--r--cpukit/score/inline/rtems/score/object.inl14
1 files changed, 12 insertions, 2 deletions
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
index f3b1730f18..6aff4757f1 100644
--- a/cpukit/score/inline/rtems/score/object.inl
+++ b/cpukit/score/inline/rtems/score/object.inl
@@ -45,7 +45,9 @@ RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id(
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
- (( (Objects_Id) node ) << OBJECTS_NODE_START_BIT) |
+ #if !defined(RTEMS_USE_16_BIT_OBJECT)
+ (( (Objects_Id) node ) << OBJECTS_NODE_START_BIT) |
+ #endif
(( (Objects_Id) index ) << OBJECTS_INDEX_START_BIT);
}
@@ -87,7 +89,15 @@ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(
Objects_Id id
)
{
- return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
+ /*
+ * If using 16-bit Ids, then there is no node field and it MUST
+ * be a single processor system.
+ */
+ #if defined(RTEMS_USE_16_BIT_OBJECT)
+ return 1;
+ #else
+ return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
+ #endif
}
/**