diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-17 16:01:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-17 16:01:03 +0000 |
commit | f4a8ee1c55788aeb053ede7571b07906a9847a45 (patch) | |
tree | 7417825a9a351aaf100374b08d314756523bef5f /c/src/exec/score/include/rtems/score | |
parent | Suggested rephrasing of inline versus macros option by Chris Johns (diff) | |
download | rtems-f4a8ee1c55788aeb053ede7571b07906a9847a45.tar.bz2 |
Unlimited objects patch from Chris Johns <ccj@acm.org>. Email follows:
First, the unlimited patch. I have compiled the unlmited patch for the
Linux posix BSP only and it seems to work cleanly. I would like a really
major application run on this change before commiting as the changes are
very core and significant. I am currently building all the tests to run.
I have no targets suitable to test on at the moment.
I have tested the patch for inline functions and macros.
Turning macros on has found some core bugs. I have fixed these but have
not run all the tests. Please review the patch for these changes. They
are:
1) The conditional compilation for MP support broke the core messages
code. You cannot embed a conditional macro in another macro. The Send
and Urgent Send calls are macros.
2) User extensions handler initialisation now has two parameters. I have
updated the macros to support the extra parameter.
The patch also contains the gcc-target-default.cfg fix required to build
the kernel. More of a by product than a fix for you.
Diffstat (limited to 'c/src/exec/score/include/rtems/score')
-rw-r--r-- | c/src/exec/score/include/rtems/score/object.h | 110 |
1 files changed, 82 insertions, 28 deletions
diff --git a/c/src/exec/score/include/rtems/score/object.h b/c/src/exec/score/include/rtems/score/object.h index a0bf3707b6..7c72719679 100644 --- a/c/src/exec/score/include/rtems/score/object.h +++ b/c/src/exec/score/include/rtems/score/object.h @@ -26,6 +26,14 @@ extern "C" { #include <rtems/score/chain.h> /* + * Mask to enable unlimited objects + * + * XXX - needs to be moved to the API some-where + */ + +#define OBJECTS_UNLIMITED_OBJECTS 0x80000000 + +/* * The following type defines the control block used to manage * object names. */ @@ -121,9 +129,9 @@ typedef enum { */ typedef struct { - Chain_Node Node; - Objects_Id id; - Objects_Name name; + Chain_Node Node; + Objects_Id id; + Objects_Name name; } Objects_Control; /* @@ -132,18 +140,24 @@ typedef struct { */ typedef struct { - Objects_Classes the_class; /* Class of this object */ - Objects_Id minimum_id; /* minimum valid id of this type */ - Objects_Id maximum_id; /* maximum valid id of this type */ - unsigned32 maximum; /* maximum number of objects */ - Objects_Control **local_table; /* table of local object pointers */ - Objects_Name *name_table; /* table of local object names */ - Chain_Control *global_table; /* pointer to global table */ - Chain_Control Inactive; /* chain of inactive ctl blocks */ - boolean is_string; /* TRUE if names are strings */ - unsigned32 name_length; /* maximum length of names */ - boolean is_thread; /* TRUE if these are threads */ - /* irregardless of API */ + Objects_Classes the_class; /* Class of this object */ + Objects_Id minimum_id; /* minimum valid id of this type */ + Objects_Id maximum_id; /* maximum valid id of this type */ + unsigned32 maximum; /* maximum number of objects */ + boolean auto_extend; /* TRUE if unlimited objects */ + unsigned32 allocation_size; /* number of objects in a block */ + unsigned32 size; /* size of the objects */ + Objects_Control **local_table; + Objects_Name *name_table; + Chain_Control *global_table; /* pointer to global table */ + Chain_Control Inactive; /* chain of inactive ctl blocks */ + unsigned32 inactive; /* number of objects on the InActive list */ + unsigned32 *inactive_per_block; /* used to release a block */ + void **object_blocks; /* the object memory to remove */ + boolean is_string; /* TRUE if names are strings */ + unsigned32 name_length; /* maximum length of names */ + boolean is_thread; /* TRUE if these are threads */ + /* irregardless of API */ } Objects_Information; /* @@ -208,6 +222,30 @@ void _Objects_Handler_initialization( ); /* + * _Objects_Extend_information + * + * DESCRIPTION: + * + * This function extends an object class information record. + */ + +void _Objects_Extend_information( + Objects_Information *information +); + +/* + * _Objects_Shrink_information + * + * DESCRIPTION: + * + * This function shrink an object class information record. + */ + +void _Objects_Shrink_information( + Objects_Information *information +); + +/* * _Objects_Initialize_information * * DESCRIPTION: @@ -232,6 +270,35 @@ void _Objects_Initialize_information ( boolean is_task ); +/*PAGE + * + * _Objects_Allocate + * + * DESCRIPTION: + * + * This function allocates a object control block from + * the inactive chain of free object control blocks. + */ + +Objects_Control *_Objects_Allocate( + Objects_Information *information +); + +/*PAGE + * + * _Objects_Free + * + * DESCRIPTION: + * + * This function frees a object control block to the + * inactive chain of free object control blocks. + */ + +void _Objects_Free( + Objects_Information *information, + Objects_Control *the_object +); + /* * _Objects_Clear_name * @@ -370,19 +437,6 @@ Objects_Control *_Objects_Get_next( ); /* - * _Objects_Get_information - * - * DESCRIPTION: - * - * Returns the information control block for the class of objects - * corresponding to this id. - */ - -Objects_Information *_Objects_Get_information( - Objects_Id id -); - -/* * Pieces of object.inl are promoted out to the user */ |