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.
This commit is contained in:
Joel Sherrill
2005-02-10 21:46:23 +00:00
parent 3d852abd06
commit 50269c464a
3 changed files with 32 additions and 13 deletions

View File

@@ -1,3 +1,15 @@
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.
2005-02-09 Ralf Corsepius <ralf.corsepius@rtems.org>
* libmisc/untar/untar.c (_rtems_octal2ulong): Replace.

View File

@@ -28,13 +28,6 @@ extern "C" {
#include <rtems/score/chain.h>
#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

View File

@@ -51,7 +51,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