summaryrefslogtreecommitdiffstats
path: root/cpukit/score/macros
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/macros
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/macros')
-rw-r--r--cpukit/score/macros/rtems/score/object.inl21
1 files changed, 17 insertions, 4 deletions
diff --git a/cpukit/score/macros/rtems/score/object.inl b/cpukit/score/macros/rtems/score/object.inl
index ddd311689b..b95b5d678b 100644
--- a/cpukit/score/macros/rtems/score/object.inl
+++ b/cpukit/score/macros/rtems/score/object.inl
@@ -45,8 +45,19 @@
*
*/
-#define _Objects_Build_id( _node, _index ) \
- ( ((_node) << 16) | (_index) )
+#define _Objects_Build_id( _the_class, _node, _index ) \
+ ( ((_the_class) << OBJECTS_CLASS_START_BIT) | \
+ ((_node) << OBJECTS_NODE_START_BIT) | \
+ ((_index) << OBJECTS_INDEX_START_BIT) )
+
+/*PAGE
+ *
+ * rtems_get_class
+ */
+
+#define rtems_get_class( _id ) \
+ (Objects_Classes) \
+ (((_id) >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS)
/*PAGE
*
@@ -55,7 +66,7 @@
*/
#define rtems_get_node( _id ) \
- ((_id) >> 16)
+ (((_id) >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS)
/*PAGE
*
@@ -64,7 +75,7 @@
*/
#define rtems_get_index( _id ) \
- ((_id) & 0xFFFF)
+ (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS)
/*PAGE
*
@@ -124,6 +135,7 @@
_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
@@ -139,6 +151,7 @@
_index = rtems_get_index( (_the_object)->id ); \
(_information)->local_table[ _index ] = NULL; \
(_information)->name_table[ _index ] = 0; \
+ (_the_object)->name = 0; \
}
#endif