From 95fbca1940805db2eca55e4ea605a5a552a36bc0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 18 Aug 1995 21:41:27 +0000 Subject: + 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. --- cpukit/score/inline/rtems/score/object.inl | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'cpukit/score/inline/rtems/score') 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,13 +57,30 @@ 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 -- cgit v1.2.3