diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-02-10 21:46:23 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-02-10 21:46:23 +0000 |
commit | 50269c464a5d679206045f875eb3740913d8b768 (patch) | |
tree | 6beafee10654c6fb430d0a594ed5092b5e203acb /cpukit/score/include | |
parent | 2005-02-10 Ralf Corsepius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-50269c464a5d679206045f875eb3740913d8b768.tar.bz2 |
2005-02-10 Joel Sherrill <joel@OARcorp.com>
PR 753/rtems
* score/include/rtems/score/object.h,
score/src/objectinitializeinformation.c: Configured number of objects
needs to be of a type with more bits than Objects_Maximum to support
configuring unlimited objects. The type for configuring the maximum
number of objects should probably always be the same fundamental type
as Object Id. For 16-bit Id configurations, the constant
OBJECTS_UNLIMITED_OBJECTS was changed to 0x8000 to move in this
direction.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/object.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 03ac837bc6..145b003147 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -29,13 +29,6 @@ extern "C" { #include <rtems/score/isr.h> /* - * Mask to enable unlimited objects. This is used in the configuration - * table when specifying the number of configured objects. - */ - -#define OBJECTS_UNLIMITED_OBJECTS 0x80000000 - -/* * The following type defines the control block used to manage * object names. */ @@ -48,7 +41,7 @@ typedef void * Objects_Name; * NOTE: Must be a power of 2. Matches the name manipulation routines. */ -#define OBJECTS_NAME_ALIGNMENT sizeof( uint32_t ) +#define OBJECTS_NAME_ALIGNMENT sizeof( uint32_t ) /* * Functions which compare names are prototyped like this. @@ -77,9 +70,16 @@ typedef uint8_t Objects_Maximum; #define OBJECTS_API_START_BIT 8 #define OBJECTS_CLASS_START_BIT 11 -#define OBJECTS_INDEX_MASK (Objects_Id)0x000000ff -#define OBJECTS_API_MASK (Objects_Id)0x00000700 -#define OBJECTS_CLASS_MASK (Objects_Id)0x0000F800 +#define OBJECTS_INDEX_MASK (Objects_Id)0x00ff +#define OBJECTS_API_MASK (Objects_Id)0x0700 +#define OBJECTS_CLASS_MASK (Objects_Id)0xF800 + +#define OBJECTS_INDEX_VALID_BITS (Objects_Id)0x00ff +#define OBJECTS_API_VALID_BITS (Objects_Id)0x0007 +/* OBJECTS_NODE_VALID_BITS should not be used with 16 bit Ids */ +#define OBJECTS_CLASS_VALID_BITS (Objects_Id)0x001f + +#define OBJECTS_UNLIMITED_OBJECTS 0x8000 #else /* @@ -109,6 +109,13 @@ typedef uint16_t Objects_Maximum; #define OBJECTS_NODE_VALID_BITS (Objects_Id)0x000000ff #define OBJECTS_API_VALID_BITS (Objects_Id)0x00000007 #define OBJECTS_CLASS_VALID_BITS (Objects_Id)0x0000001f + +/* + * Mask to enable unlimited objects. This is used in the configuration + * table when specifying the number of configured objects. + */ +#define OBJECTS_UNLIMITED_OBJECTS 0x80000000 + #endif /* @@ -344,7 +351,7 @@ void _Objects_Initialize_information ( Objects_Information *information, Objects_APIs the_api, uint32_t the_class, - Objects_Maximum maximum, + uint32_t maximum, uint16_t size, boolean is_string, uint32_t maximum_name_length |