Changeset 3a4ae6c in rtems for cpukit/score/inline


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, 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.

Location:
cpukit/score/inline/rtems/score
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/inline/rtems/score/address.inl

    r5072b07 r3a4ae6c  
    2929)
    3030{
    31   return (base + offset);
     31  return (void *)((char *)base + offset);
    3232}
    3333
     
    4343)
    4444{
    45   return (base - offset);
    46 }
    47 
    48 /*PAGE
    49  *
    50  *  _Addresses_Add
    51  *
    52  *  NOTE:  The cast of an address to an unsigned32 makes this code
    53  *         dependent on an addresses being thirty two bits.
    54  */
    55 
    56 STATIC INLINE void *_Addresses_Add (
    57   void *left,
    58   void *right
    59 )
    60 {
    61   return (left + (unsigned32)right);
     45  return (void *)((char *)base - offset);
    6246}
    6347
  • cpukit/score/inline/rtems/score/heap.inl

    r5072b07 r3a4ae6c  
    1818#define __HEAP_inl
    1919
    20 #include <rtems/address.h>
     20#include <rtems/core/address.h>
    2121
    2222/*PAGE
  • cpukit/score/inline/rtems/score/isr.inl

    r5072b07 r3a4ae6c  
    1717#ifndef __ISR_inl
    1818#define __ISR_inl
    19 
    20 /*PAGE
    21  *
    22  *  _ISR_Handler_initialization
    23  *
    24  */
    25 
    26 STATIC INLINE void _ISR_Handler_initialization ( void )
    27 {
    28   _ISR_Signals_to_thread_executing = FALSE;
    29   _ISR_Nest_level = 0;
    30 }
    3119
    3220/*PAGE
  • cpukit/score/inline/rtems/score/mppkt.inl

    r5072b07 r3a4ae6c  
    2727
    2828STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
    29   rtems_mp_packet_classes the_packet_class
     29  MP_packet_Classes the_packet_class
    3030)
    3131{
     
    4040
    4141STATIC INLINE boolean _Mp_packet_Is_null (
    42   rtems_packet_prefix   *the_packet
     42  MP_packet_Prefix   *the_packet
    4343)
    4444{
  • cpukit/score/inline/rtems/score/object.inl

    r5072b07 r3a4ae6c  
    3737/*PAGE
    3838 *
    39  *  rtems_get_class
     39 *  _Objects_Get_class
    4040 */
    4141 
    42 STATIC INLINE Objects_Classes rtems_get_class(
     42STATIC INLINE Objects_Classes _Objects_Get_class(
    4343  Objects_Id id
    4444)
     
    5151/*PAGE
    5252 *
    53  *  rtems_get_node
     53 *  _Objects_Get_node
    5454 *
    5555 */
    5656
    57 STATIC INLINE unsigned32 rtems_get_node(
     57STATIC INLINE unsigned32 _Objects_Get_node(
    5858  Objects_Id id
    5959)
     
    6464/*PAGE
    6565 *
    66  *  rtems_get_index
     66 *  _Objects_Get_index
    6767 *
    6868 */
    6969
    70 STATIC INLINE unsigned32 rtems_get_index(
     70STATIC INLINE unsigned32 _Objects_Get_index(
    7171  Objects_Id id
    7272)
     
    111111)
    112112{
    113   return _Objects_Is_local_node( rtems_get_node(id) );
     113  return _Objects_Is_local_node( _Objects_Get_node(id) );
    114114}
    115115
     
    169169  unsigned32  index;
    170170
    171   index = rtems_get_index( the_object->id );
     171  index = _Objects_Get_index( the_object->id );
    172172  information->local_table[ index ] = the_object;
    173173
     
    191191  unsigned32 index;
    192192
    193   index = rtems_get_index( the_object->id );
     193  index = _Objects_Get_index( the_object->id );
    194194  information->local_table[ index ] = NULL;
    195195  _Objects_Clear_name( the_object->name, information->name_length );
  • cpukit/score/inline/rtems/score/priority.inl

    r5072b07 r3a4ae6c  
    1818#define __PRIORITY_inl
    1919
    20 #include <rtems/bitfield.h>
     20#include <rtems/core/bitfield.h>
    2121
    2222/*PAGE
     
    4545)
    4646{
    47   return (  ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
    48             ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
     47  /*
     48   *  Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
     49   *  then checking for less than 0 is unnecessary.
     50   */
     51
     52  return ( the_priority <= PRIORITY_MAXIMUM );
    4953}
    5054
  • cpukit/score/inline/rtems/score/stack.inl

    r5072b07 r3a4ae6c  
    4444)
    4545{
    46   return ( size >= RTEMS_MINIMUM_STACK_SIZE );
     46  return ( size >= STACK_MINIMUM_SIZE );
    4747}
    4848
  • cpukit/score/inline/rtems/score/states.inl

    r5072b07 r3a4ae6c  
    22 *
    33 *  This file contains the macro implementation of the inlined
    4  *  routines associated with RTEMS state information.
     4 *  routines associated with thread state information.
    55 *
    66 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    178178/*PAGE
    179179 *
     180 *  _States_Is_waiting_for_mutex
     181 *
     182 */
     183 
     184STATIC INLINE boolean _States_Is_waiting_for_mutex (
     185  States_Control the_states
     186)
     187{
     188   return (the_states & STATES_WAITING_FOR_MUTEX);
     189}
     190
     191/*PAGE
     192 *
    180193 *  _States_Is_waiting_for_semaphore
    181194 *
  • cpukit/score/inline/rtems/score/sysstate.inl

    r5072b07 r3a4ae6c  
    1818#define __SYSTEM_STATE_inl
    1919
     20/*PAGE
     21 *
     22 *  _System_state_Handler_initialization
     23 */
     24 
     25STATIC INLINE void _System_state_Handler_initialization (
     26  boolean  is_multiprocessing
     27)
     28{
     29  _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
     30  _System_state_Is_multiprocessing = is_multiprocessing;
     31}
     32 
    2033/*PAGE
    2134 *
  • cpukit/score/inline/rtems/score/thread.inl

    r5072b07 r3a4ae6c  
    249249  }
    250250 
    251   the_class = rtems_get_class( id );
     251  the_class = _Objects_Get_class( id );
    252252 
    253253  if ( the_class > OBJECTS_CLASSES_LAST ) {
     
    266266}
    267267
     268/*
     269 *  _Thread_Is_proxy_blocking
     270 *
     271 */
     272
     273STATIC INLINE boolean _Thread_Is_proxy_blocking (
     274  unsigned32 code
     275)
     276{
     277  return (code == THREAD_STATUS_PROXY_BLOCKING);
     278}
     279
    268280#endif
    269281/* end of include file */
  • cpukit/score/inline/rtems/score/tod.inl

    r5072b07 r3a4ae6c  
    5959
    6060STATIC INLINE void _TOD_Activate(
    61   rtems_interval ticks
     61  Watchdog_Interval ticks
    6262)
    6363{
  • cpukit/score/inline/rtems/score/userext.inl

    r5072b07 r3a4ae6c  
    2525
    2626STATIC INLINE void _User_extensions_Handler_initialization (
    27     rtems_extensions_table *initial_extensions
     27    User_extensions_Table *initial_extensions
    2828)
    2929{
     
    4343STATIC INLINE void _User_extensions_Add_set (
    4444  User_extensions_Control *the_extension,
    45   rtems_extensions_table  *extension_table
     45  User_extensions_Table   *extension_table
    4646)
    4747{
     
    5151}
    5252
     53/*PAGE
     54 *
     55 *  _User_extensions_Add_API_set
     56 */
     57 
     58STATIC INLINE void _User_extensions_Add_API_set (
     59  User_extensions_Control *the_extension
     60)
     61{
     62  _Chain_Prepend( &_User_extensions_List, &the_extension->Node );
     63}
     64 
    5365/*PAGE
    5466 *
     
    6577/*PAGE
    6678 *
    67  *  _User_extensions_Task_create
     79 *  _User_extensions_Thread_switch
    6880 *
    6981 */
    7082
    71 STATIC INLINE void _User_extensions_Task_create (
    72   Thread_Control *the_thread
    73 )
    74 {
    75   Chain_Node              *the_node;
    76   User_extensions_Control *the_extension;
    77 
    78   for ( the_node = _User_extensions_List.first ;
    79         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    80         the_node = the_node->next ) {
    81 
    82     the_extension = (User_extensions_Control *) the_node;
    83 
    84     if ( the_extension->Callouts.rtems_task_create != NULL )
    85       (*the_extension->Callouts.rtems_task_create)(
    86         _Thread_Executing,
    87         the_thread
    88       );
    89   }
    90 }
    91 
    92 /*PAGE
    93  *
    94  *  _User_extensions_Task_delete
    95  */
    96 
    97 STATIC INLINE void _User_extensions_Task_delete (
    98   Thread_Control *the_thread
    99 )
    100 {
    101   Chain_Node              *the_node;
    102   User_extensions_Control *the_extension;
    103 
    104   for ( the_node = _User_extensions_List.last ;
    105         !_Chain_Is_head( &_User_extensions_List, the_node ) ;
    106         the_node = the_node->previous ) {
    107 
    108     the_extension = (User_extensions_Control *) the_node;
    109 
    110     if ( the_extension->Callouts.rtems_task_delete != NULL )
    111       (*the_extension->Callouts.rtems_task_delete)(
    112         _Thread_Executing,
    113         the_thread
    114       );
    115   }
    116 }
    117 
    118 /*PAGE
    119  *
    120  *  _User_extensions_Task_start
    121  *
    122  */
    123 
    124 STATIC INLINE void _User_extensions_Task_start (
    125   Thread_Control *the_thread
    126 )
    127 {
    128   Chain_Node              *the_node;
    129   User_extensions_Control *the_extension;
    130 
    131   for ( the_node = _User_extensions_List.first ;
    132         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    133         the_node = the_node->next ) {
    134 
    135     the_extension = (User_extensions_Control *) the_node;
    136 
    137     if ( the_extension->Callouts.rtems_task_start != NULL )
    138       (*the_extension->Callouts.rtems_task_start)(
    139         _Thread_Executing,
    140         the_thread
    141       );
    142   }
    143 }
    144 
    145 /*PAGE
    146  *
    147  *  _User_extensions_Task_restart
    148  *
    149  */
    150 
    151 STATIC INLINE void _User_extensions_Task_restart (
    152   Thread_Control *the_thread
    153 )
    154 {
    155   Chain_Node              *the_node;
    156   User_extensions_Control *the_extension;
    157 
    158   for ( the_node = _User_extensions_List.first ;
    159         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    160         the_node = the_node->next ) {
    161 
    162     the_extension = (User_extensions_Control *) the_node;
    163 
    164     if ( the_extension->Callouts.rtems_task_restart != NULL )
    165       (*the_extension->Callouts.rtems_task_restart)(
    166         _Thread_Executing,
    167         the_thread
    168       );
    169   }
    170 }
    171 
    172 /*PAGE
    173  *
    174  *  _User_extensions_Task_switch
    175  *
    176  */
    177 
    178 STATIC INLINE void _User_extensions_Task_switch (
     83STATIC INLINE void _User_extensions_Thread_switch (
    17984  Thread_Control *executing,
    18085  Thread_Control *heir
     
    19095    the_extension = (User_extensions_Control *) the_node;
    19196
    192     if ( the_extension->Callouts.task_switch != NULL )
    193       (*the_extension->Callouts.task_switch)( executing, heir );
     97    if ( the_extension->Callouts.thread_switch != NULL )
     98      (*the_extension->Callouts.thread_switch)( executing, heir );
    19499  }
    195100}
     
    197102/*PAGE
    198103 *
    199  *  _User_extensions_Task_begin
     104 *  _User_extensions_Thread_post_switch
    200105 *
    201106 */
    202 
    203 STATIC INLINE void _User_extensions_Task_begin (
     107 
     108STATIC INLINE void _User_extensions_Thread_post_switch (
    204109  Thread_Control *executing
    205110)
     
    207112  Chain_Node              *the_node;
    208113  User_extensions_Control *the_extension;
    209 
     114 
    210115  for ( the_node = _User_extensions_List.first ;
    211116        !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    212117        the_node = the_node->next ) {
    213 
     118 
    214119    the_extension = (User_extensions_Control *) the_node;
    215 
    216     if ( the_extension->Callouts.task_begin != NULL )
    217       (*the_extension->Callouts.task_begin)( executing );
    218   }
    219 }
    220 
    221 /*PAGE
    222  *
    223  *  _User_extensions_Task_exitted
    224  */
    225 
    226 STATIC INLINE void _User_extensions_Task_exitted (
    227   Thread_Control *executing
    228 )
    229 {
    230   Chain_Node              *the_node;
    231   User_extensions_Control *the_extension;
    232 
    233   for ( the_node = _User_extensions_List.last ;
    234         !_Chain_Is_head( &_User_extensions_List, the_node ) ;
    235         the_node = the_node->previous ) {
    236 
    237     the_extension = (User_extensions_Control *) the_node;
    238 
    239     if ( the_extension->Callouts.task_exitted != NULL )
    240       (*the_extension->Callouts.task_exitted)( executing );
    241   }
    242 }
    243 
    244 /*PAGE
    245  *
    246  *  _User_extensions_Fatal
    247  */
    248 
    249 STATIC INLINE void _User_extensions_Fatal (
    250   unsigned32 the_error
    251 )
    252 {
    253   Chain_Node              *the_node;
    254   User_extensions_Control *the_extension;
    255 
    256   for ( the_node = _User_extensions_List.last ;
    257         !_Chain_Is_head( &_User_extensions_List, the_node ) ;
    258         the_node = the_node->previous ) {
    259 
    260     the_extension = (User_extensions_Control *) the_node;
    261 
    262     if ( the_extension->Callouts.fatal != NULL )
    263       (*the_extension->Callouts.fatal)( the_error );
     120 
     121    if ( the_extension->Callouts.thread_post_switch != NULL )
     122      (*the_extension->Callouts.thread_post_switch)( executing );
    264123  }
    265124}
  • cpukit/score/inline/rtems/score/watchdog.inl

    r5072b07 r3a4ae6c  
    2525
    2626STATIC INLINE void _Watchdog_Initialize(
    27   Watchdog_Control *the_watchdog,
    28   rtems_timer_service_routine_entry  routine,
    29   Objects_Id        id,
    30   void             *user_data
     27  Watchdog_Control               *the_watchdog,
     28  Watchdog_Service_routine_entry  routine,
     29  Objects_Id                      id,
     30  void                           *user_data
    3131)
    3232{
     
    116116STATIC INLINE void _Watchdog_Insert_ticks(
    117117  Watchdog_Control      *the_watchdog,
    118   rtems_interval      units,
     118  Watchdog_Interval      units,
    119119  Watchdog_Insert_modes  insert_mode
    120120)
     
    135135STATIC INLINE void _Watchdog_Insert_seconds(
    136136  Watchdog_Control      *the_watchdog,
    137   rtems_interval      units,
     137  Watchdog_Interval      units,
    138138  Watchdog_Insert_modes  insert_mode
    139139)
     
    154154STATIC INLINE void _Watchdog_Adjust_seconds(
    155155  Watchdog_Adjust_directions direction,
    156   rtems_interval          units
     156  Watchdog_Interval          units
    157157)
    158158{
     
    170170STATIC INLINE void _Watchdog_Adjust_ticks(
    171171  Watchdog_Adjust_directions direction,
    172   rtems_interval          units
     172  Watchdog_Interval          units
    173173)
    174174{
  • cpukit/score/inline/rtems/score/wkspace.inl

    r5072b07 r3a4ae6c  
    22 *
    33 *  This include file contains the bodies of the routines which contains
    4  *  information related to the RTEMS RAM Workspace.
     4 *  information related to the RAM Workspace.
    55 *
    66 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    3333  unsigned32  memory_available;
    3434
    35   if ( (starting_address == NULL) ||
    36        !_Addresses_Is_aligned( starting_address ) )
    37     rtems_fatal_error_occurred( RTEMS_INVALID_ADDRESS );
     35  if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
     36    _Internal_error_Occurred(
     37      INTERNAL_ERROR_CORE,
     38      TRUE,
     39      INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
     40    );
    3841
    3942  if ( _CPU_Table.do_zero_of_workspace ) {
     
    5255
    5356  if ( memory_available == 0 )
    54     rtems_fatal_error_occurred( RTEMS_UNSATISFIED );
     57    _Internal_error_Occurred(
     58      INTERNAL_ERROR_CORE,
     59      TRUE,
     60      INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
     61    );
    5562}
    5663
Note: See TracChangeset for help on using the changeset viewer.