Changeset 3a4ae6c in rtems for cpukit/sapi/src/extension.c


Ignore:
Timestamp:
Sep 11, 1995, 7:35:39 PM (25 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/sapi/src/extension.c

    r5072b07 r3a4ae6c  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/support.h>
    18 #include <rtems/object.h>
    19 #include <rtems/thread.h>
     17#include <rtems/rtems/support.h>
     18#include <rtems/core/object.h>
     19#include <rtems/core/thread.h>
    2020#include <rtems/extension.h>
    2121
     
    6666
    6767rtems_status_code rtems_extension_create(
    68   rtems_name                     name,
     68  rtems_name              name,
    6969  rtems_extensions_table *extension_table,
    70   Objects_Id                    *id
     70  Objects_Id             *id
    7171)
    7272{
     
    7474
    7575  if ( !rtems_is_name_valid( name ) )
    76     return ( RTEMS_INVALID_NAME );
     76    return RTEMS_INVALID_NAME;
    7777
    7878  _Thread_Disable_dispatch();         /* to prevent deletion */
     
    8282  if ( !the_extension ) {
    8383    _Thread_Enable_dispatch();
    84     return( RTEMS_TOO_MANY );
     84    return RTEMS_TOO_MANY;
    8585  }
    8686
     
    9191  *id = the_extension->Object.id;
    9292  _Thread_Enable_dispatch();
    93   return( RTEMS_SUCCESSFUL );
     93  return RTEMS_SUCCESSFUL;
    9494}
    9595
     
    116116)
    117117{
    118   return _Objects_Name_to_id(
     118  Objects_Name_to_id_errors  status;
     119
     120  status = _Objects_Name_to_id(
    119121    &_Extension_Information,
    120122    &name,
    121     RTEMS_SEARCH_LOCAL_NODE,
     123    OBJECTS_SEARCH_LOCAL_NODE,
    122124    id
    123125  );
     126
     127  return _Status_Object_name_errors_to_status[ status ];
    124128}
    125129
     
    149153    case OBJECTS_ERROR:
    150154    case OBJECTS_REMOTE:            /* should never return this */
    151       return( RTEMS_INVALID_ID );
     155      return RTEMS_INVALID_ID;
    152156    case OBJECTS_LOCAL:
    153157      _User_extensions_Remove_set( &the_extension->Extension );
     
    155159      _Extension_Free( the_extension );
    156160      _Thread_Enable_dispatch();
    157       return( RTEMS_SUCCESSFUL );
     161      return RTEMS_SUCCESSFUL;
    158162  }
    159163
    160   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     164  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    161165}
Note: See TracChangeset for help on using the changeset viewer.