summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/objectmp.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
commit3a4ae6c210bcc37754767966f1128ae23c77b6af (patch)
tree8804983e5b92bec788d548df13db7513118d351d /cpukit/score/src/objectmp.c
parentnew file -- split from inlines (diff)
downloadrtems-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 'cpukit/score/src/objectmp.c')
-rw-r--r--cpukit/score/src/objectmp.c53
1 files changed, 31 insertions, 22 deletions
diff --git a/cpukit/score/src/objectmp.c b/cpukit/score/src/objectmp.c
index 9752aadbc6..a7c1eff58c 100644
--- a/cpukit/score/src/objectmp.c
+++ b/cpukit/score/src/objectmp.c
@@ -14,9 +14,10 @@
*/
#include <rtems/system.h>
-#include <rtems/object.h>
-#include <rtems/wkspace.h>
-#include <rtems/config.h>
+#include <rtems/core/interr.h>
+#include <rtems/core/object.h>
+#include <rtems/core/wkspace.h>
+#include <rtems/rtems/support.h>
/*PAGE
*
@@ -25,9 +26,12 @@
*/
void _Objects_MP_Handler_initialization (
- unsigned32 maximum_global_objects
+ unsigned32 node,
+ unsigned32 maximum_nodes,
+ unsigned32 maximum_global_objects
)
{
+ _Objects_MP_Maximum_global_objects = maximum_global_objects;
if ( maximum_global_objects == 0 ) {
_Chain_Initialize_empty( &_Objects_MP_Inactive_global_objects );
@@ -62,7 +66,7 @@ void _Objects_MP_Open (
the_global_object->name = the_name;
_Chain_Prepend(
- &information->global_table[ rtems_get_node( the_id ) ],
+ &information->global_table[ _Objects_Get_node( the_id ) ],
&the_global_object->Object.Node
);
@@ -89,7 +93,11 @@ boolean _Objects_MP_Allocate_and_open (
if ( is_fatal_error == FALSE )
return FALSE;
- rtems_fatal_error_occurred( RTEMS_TOO_MANY );
+ _Internal_error_Occurred(
+ INTERNAL_ERROR_CORE,
+ TRUE,
+ INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS
+ );
}
@@ -113,7 +121,7 @@ void _Objects_MP_Close (
Chain_Node *the_node;
Objects_MP_Control *the_object;
- the_chain = &information->global_table[ rtems_get_node( the_id ) ];
+ the_chain = &information->global_table[ _Objects_Get_node( the_id ) ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
@@ -132,9 +140,11 @@ void _Objects_MP_Close (
}
- rtems_fatal_error_occurred( RTEMS_INVALID_ID );
-
-
+ _Internal_error_Occurred(
+ INTERNAL_ERROR_CORE,
+ TRUE,
+ INTERNAL_ERROR_INVALID_GLOBAL_ID
+ );
}
/*PAGE
@@ -143,7 +153,7 @@ void _Objects_MP_Close (
*
*/
-rtems_status_code _Objects_MP_Global_name_search (
+Objects_Name_to_id_errors _Objects_MP_Global_name_search (
Objects_Information *information,
Objects_Name the_name,
unsigned32 nodes_to_search,
@@ -158,17 +168,16 @@ rtems_status_code _Objects_MP_Global_name_search (
Objects_MP_Control *the_object;
unsigned32 name_to_use = *(unsigned32 *)the_name; /* XXX variable */
-
- if ( nodes_to_search > _Configuration_MP_table->maximum_nodes )
- return ( RTEMS_INVALID_NODE );
+ if ( nodes_to_search > _Objects_Maximum_nodes )
+ return OBJECTS_INVALID_NODE;
if ( information->global_table == NULL )
- return ( RTEMS_INVALID_NAME );
+ return OBJECTS_INVALID_NAME;
- if ( nodes_to_search == RTEMS_SEARCH_ALL_NODES ||
- nodes_to_search == RTEMS_SEARCH_OTHER_NODES ) {
+ if ( nodes_to_search == OBJECTS_SEARCH_ALL_NODES ||
+ nodes_to_search == OBJECTS_SEARCH_OTHER_NODES ) {
low_node = 1;
- high_node = _Configuration_MP_table->maximum_nodes;
+ high_node = _Objects_Maximum_nodes;
} else {
low_node =
high_node = nodes_to_search;
@@ -195,14 +204,14 @@ rtems_status_code _Objects_MP_Global_name_search (
if ( the_object->name == name_to_use ) {
*the_id = the_object->Object.id;
_Thread_Enable_dispatch();
- return ( RTEMS_SUCCESSFUL );
+ return OBJECTS_SUCCESSFUL;
}
}
}
}
_Thread_Enable_dispatch();
- return ( RTEMS_INVALID_NAME );
+ return OBJECTS_INVALID_NAME;
}
/*PAGE
@@ -223,7 +232,7 @@ void _Objects_MP_Is_remote (
Chain_Node *the_node;
Objects_MP_Control *the_global_object;
- node = rtems_get_node( the_id );
+ node = _Objects_Get_node( the_id );
/*
* NOTE: The local node was search (if necessary) by
@@ -235,7 +244,7 @@ void _Objects_MP_Is_remote (
if ( node == 0 ||
_Objects_Is_local_node( node ) ||
- node > _Configuration_MP_table->maximum_nodes ||
+ node > _Objects_Maximum_nodes ||
information->global_table == NULL ) {
*location = OBJECTS_ERROR;