summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-18 21:41:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-18 21:41:27 +0000
commit95fbca1940805db2eca55e4ea605a5a552a36bc0 (patch)
tree8f4df72be3791d002048cff1ce082ab74cd435f6 /cpukit/score/inline
parentb06e68ef1f6df69cc86d72356c3a002054a35fad (diff)
downloadrtems-95fbca1940805db2eca55e4ea605a5a552a36bc0.tar.bz2
+ Added object type field to object id.
+ Added name pointer to Object_Control. + Modified Object Open and Close to address name field. + Removed name as separate element from Thread and Proxy Control.
Diffstat (limited to 'cpukit/score/inline')
-rw-r--r--cpukit/score/inline/rtems/score/object.inl29
1 files changed, 24 insertions, 5 deletions
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
index 9c2110077c..da65807aa1 100644
--- a/cpukit/score/inline/rtems/score/object.inl
+++ b/cpukit/score/inline/rtems/score/object.inl
@@ -57,15 +57,32 @@ STATIC INLINE void rtems_name_to_characters(
*/
STATIC INLINE Objects_Id _Objects_Build_id(
- unsigned32 node,
- unsigned32 index
+ Objects_Classes the_class,
+ unsigned32 node,
+ unsigned32 index
)
{
- return ( (node << 16) | index );
+ return ( (the_class << OBJECTS_CLASS_START_BIT) |
+ (node << OBJECTS_NODE_START_BIT) |
+ (index << OBJECTS_INDEX_START_BIT) );
}
/*PAGE
*
+ * rtems_get_class
+ */
+
+STATIC INLINE Objects_Classes rtems_get_class(
+ Objects_Id id
+)
+{
+ return (Objects_Classes)
+ ((id >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS);
+}
+
+
+/*PAGE
+ *
* rtems_get_node
*
*/
@@ -74,7 +91,7 @@ STATIC INLINE unsigned32 rtems_get_node(
Objects_Id id
)
{
- return (id >> 16);
+ return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
}
/*PAGE
@@ -87,7 +104,7 @@ STATIC INLINE unsigned32 rtems_get_index(
Objects_Id id
)
{
- return (id &0xFFFF);
+ return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
}
/*PAGE
@@ -174,6 +191,7 @@ STATIC INLINE void _Objects_Open(
index = rtems_get_index( the_object->id );
information->local_table[ index ] = the_object;
information->name_table[ index ] = name;
+ the_object->name = &information->name_table[ index ];
}
/*PAGE
@@ -192,6 +210,7 @@ STATIC INLINE void _Objects_Close(
index = rtems_get_index( the_object->id );
information->local_table[ index ] = NULL;
information->name_table[ index ] = 0;
+ the_object->name = 0;
}
#endif