Changeset 3a4ae6c in rtems for cpukit/score/src/object.c


Ignore:
Timestamp:
Sep 11, 1995, 7:35:39 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ced11f99
Parents:
5072b07
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/object.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/chain.h>
    18 #include <rtems/config.h>
    19 #include <rtems/object.h>
     17#include <rtems/core/chain.h>
     18#include <rtems/core/object.h>
    2019#include <rtems/objectmp.h>
    21 #include <rtems/thread.h>
    22 #include <rtems/wkspace.h>
     20#include <rtems/core/thread.h>
     21#include <rtems/core/wkspace.h>
     22#include <rtems/sysstate.h>
    2323
    2424/*PAGE
     
    3030 *  Input parameters:
    3131 *    node                   - local node
     32 *    maximum_nodes          - number of nodes in the system
    3233 *    maximum_global_objects - number of configured global objects
    3334 *
     
    3738void _Objects_Handler_initialization(
    3839  unsigned32 node,
     40  unsigned32 maximum_nodes,
    3941  unsigned32 maximum_global_objects
    4042)
    4143{
    42   _Objects_Local_node = node;
    43 
    44   _Objects_MP_Handler_initialization( maximum_global_objects );
     44  if ( node < 1 || node > maximum_nodes )
     45    _Internal_error_Occurred(
     46      INTERNAL_ERROR_CORE,
     47      TRUE,
     48      INTERNAL_ERROR_INVALID_NODE
     49    );
     50
     51  _Objects_Local_node    = node;
     52  _Objects_Maximum_nodes = maximum_nodes;
     53
     54  _Objects_MP_Handler_initialization(
     55    node,
     56    maximum_nodes,
     57    maximum_global_objects
     58  );
    4559}
    4660
     
    167181   */
    168182
    169   if ( supports_global == TRUE && _Configuration_Is_multiprocessing() ) {
     183  if ( supports_global == TRUE && _System_state_Is_multiprocessing ) {
    170184
    171185    information->global_table = _Workspace_Allocate_or_fatal_error(
    172       (_Configuration_MP_table->maximum_nodes + 1) * sizeof(Chain_Control)
     186      (_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
    173187    );
    174188
    175     for ( index=1;
    176           index <= _Configuration_MP_table->maximum_nodes ;
    177           index++ )
     189    for ( index=1; index <= _Objects_Maximum_nodes ; index++ )
    178190      _Chain_Initialize_empty( &information->global_table[ index ] );
    179191   }
     
    309321 *
    310322 *  Output parameters:
    311  *    obj_id     - object id
    312  *    RTEMS_SUCCESSFUL - if successful
    313  *    error code - if unsuccessful
    314  */
    315 
    316 rtems_status_code _Objects_Name_to_id(
     323 *    id                 - object id
     324 *    OBJECTS_SUCCESSFUL - if successful
     325 *    error code         - if unsuccessful
     326 */
     327
     328Objects_Name_to_id_errors _Objects_Name_to_id(
    317329  Objects_Information *information,
    318330  Objects_Name         name,
     
    329341
    330342  if ( name == 0 )
    331     return( RTEMS_INVALID_NAME );
     343    return OBJECTS_INVALID_NAME;
    332344
    333345  search_local_node = FALSE;
    334346
    335347  if ( information->maximum != 0 &&
    336       (node == RTEMS_SEARCH_ALL_NODES || node == RTEMS_SEARCH_LOCAL_NODE ||
     348      (node == OBJECTS_SEARCH_ALL_NODES || node == OBJECTS_SEARCH_LOCAL_NODE ||
    337349      _Objects_Is_local_node( node ) ) )
    338350   search_local_node = TRUE;
     
    355367      if ( (*compare_them)( name, the_object->name, name_length ) ) {
    356368        *id = the_object->id;
    357         return( RTEMS_SUCCESSFUL );
     369        return OBJECTS_SUCCESSFUL;
    358370      }
    359371    }
    360372  }
    361373
    362   if ( _Objects_Is_local_node( node ) || node == RTEMS_SEARCH_LOCAL_NODE )
    363     return( RTEMS_INVALID_NAME );
     374  if ( _Objects_Is_local_node( node ) || node == OBJECTS_SEARCH_LOCAL_NODE )
     375    return OBJECTS_INVALID_NAME;
    364376
    365377  return ( _Objects_MP_Global_name_search( information, name, node, id ) );
     
    450462    Objects_Id       next_id;
    451463   
    452     if (rtems_get_index(id) == RTEMS_OBJECT_ID_INITIAL_INDEX)
     464    if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
    453465        next_id = information->minimum_id;
    454466    else
     
    457469    do {
    458470        /* walked off end of list? */
    459         if (rtems_get_index(next_id) > information->maximum)
     471        if (_Objects_Get_index(next_id) > information->maximum)
    460472        {
    461473            *location_p = OBJECTS_ERROR;
     
    474486
    475487final:
    476     *next_id_p = RTEMS_OBJECT_ID_FINAL;
     488    *next_id_p = OBJECTS_ID_FINAL;
    477489    return 0;
    478490}
     
    491503  Objects_Classes  the_class;
    492504
    493   the_class = rtems_get_class( id );
     505  the_class = _Objects_Get_class( id );
    494506
    495507  if ( !_Objects_Is_class_valid( the_class ) )
Note: See TracChangeset for help on using the changeset viewer.