diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-11 19:35:39 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-11 19:35:39 +0000 |
commit | 3a4ae6c210bcc37754767966f1128ae23c77b6af (patch) | |
tree | 8804983e5b92bec788d548df13db7513118d351d /c/src/exec/score/src/object.c | |
parent | new file -- split from inlines (diff) | |
download | rtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2 |
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.
Configuration parameter maximum_devices added.
Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.
Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.
Added user extension for post-switch.
Utilized user extensions to implement API specific functionality
like signal dispatching.
Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.
Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.
All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.
Updated spsize to reflect new and moved variables.
Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.
Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/score/src/object.c | 62 |
1 files changed, 37 insertions, 25 deletions
diff --git a/c/src/exec/score/src/object.c b/c/src/exec/score/src/object.c index b274579736..7ff6aa5204 100644 --- a/c/src/exec/score/src/object.c +++ b/c/src/exec/score/src/object.c @@ -14,12 +14,12 @@ */ #include <rtems/system.h> -#include <rtems/chain.h> -#include <rtems/config.h> -#include <rtems/object.h> +#include <rtems/core/chain.h> +#include <rtems/core/object.h> #include <rtems/objectmp.h> -#include <rtems/thread.h> -#include <rtems/wkspace.h> +#include <rtems/core/thread.h> +#include <rtems/core/wkspace.h> +#include <rtems/sysstate.h> /*PAGE * @@ -29,6 +29,7 @@ * * Input parameters: * node - local node + * maximum_nodes - number of nodes in the system * maximum_global_objects - number of configured global objects * * Output parameters: NONE @@ -36,12 +37,25 @@ void _Objects_Handler_initialization( unsigned32 node, + unsigned32 maximum_nodes, unsigned32 maximum_global_objects ) { - _Objects_Local_node = node; + if ( node < 1 || node > maximum_nodes ) + _Internal_error_Occurred( + INTERNAL_ERROR_CORE, + TRUE, + INTERNAL_ERROR_INVALID_NODE + ); + + _Objects_Local_node = node; + _Objects_Maximum_nodes = maximum_nodes; - _Objects_MP_Handler_initialization( maximum_global_objects ); + _Objects_MP_Handler_initialization( + node, + maximum_nodes, + maximum_global_objects + ); } /*PAGE @@ -166,15 +180,13 @@ void _Objects_Initialize_information( * Take care of multiprocessing */ - if ( supports_global == TRUE && _Configuration_Is_multiprocessing() ) { + if ( supports_global == TRUE && _System_state_Is_multiprocessing ) { information->global_table = _Workspace_Allocate_or_fatal_error( - (_Configuration_MP_table->maximum_nodes + 1) * sizeof(Chain_Control) + (_Objects_Maximum_nodes + 1) * sizeof(Chain_Control) ); - for ( index=1; - index <= _Configuration_MP_table->maximum_nodes ; - index++ ) + for ( index=1; index <= _Objects_Maximum_nodes ; index++ ) _Chain_Initialize_empty( &information->global_table[ index ] ); } else @@ -308,12 +320,12 @@ boolean _Objects_Compare_name_raw( * id - address of return ID * * Output parameters: - * obj_id - object id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful + * id - object id + * OBJECTS_SUCCESSFUL - if successful + * error code - if unsuccessful */ -rtems_status_code _Objects_Name_to_id( +Objects_Name_to_id_errors _Objects_Name_to_id( Objects_Information *information, Objects_Name name, unsigned32 node, @@ -328,12 +340,12 @@ rtems_status_code _Objects_Name_to_id( Objects_Name_comparators compare_them; if ( name == 0 ) - return( RTEMS_INVALID_NAME ); + return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && - (node == RTEMS_SEARCH_ALL_NODES || node == RTEMS_SEARCH_LOCAL_NODE || + (node == OBJECTS_SEARCH_ALL_NODES || node == OBJECTS_SEARCH_LOCAL_NODE || _Objects_Is_local_node( node ) ) ) search_local_node = TRUE; @@ -354,13 +366,13 @@ rtems_status_code _Objects_Name_to_id( if ( (*compare_them)( name, the_object->name, name_length ) ) { *id = the_object->id; - return( RTEMS_SUCCESSFUL ); + return OBJECTS_SUCCESSFUL; } } } - if ( _Objects_Is_local_node( node ) || node == RTEMS_SEARCH_LOCAL_NODE ) - return( RTEMS_INVALID_NAME ); + if ( _Objects_Is_local_node( node ) || node == OBJECTS_SEARCH_LOCAL_NODE ) + return OBJECTS_INVALID_NAME; return ( _Objects_MP_Global_name_search( information, name, node, id ) ); } @@ -449,14 +461,14 @@ _Objects_Get_next( Objects_Control *object; Objects_Id next_id; - if (rtems_get_index(id) == RTEMS_OBJECT_ID_INITIAL_INDEX) + if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; else next_id = id; do { /* walked off end of list? */ - if (rtems_get_index(next_id) > information->maximum) + if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; goto final; @@ -473,7 +485,7 @@ _Objects_Get_next( return object; final: - *next_id_p = RTEMS_OBJECT_ID_FINAL; + *next_id_p = OBJECTS_ID_FINAL; return 0; } @@ -490,7 +502,7 @@ Objects_Information *_Objects_Get_information( { Objects_Classes the_class; - the_class = rtems_get_class( id ); + the_class = _Objects_Get_class( id ); if ( !_Objects_Is_class_valid( the_class ) ) return NULL; |