Changeset 3a4ae6c in rtems for cpukit/score/macros


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/macros/rtems/score
Files:
2 added
12 edited

Legend:

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

    r5072b07 r3a4ae6c  
    2525
    2626#define _Addresses_Add_offset( _base, _offset ) \
    27   ((void *)(_base) + (_offset))
     27  ((void *)((char *)(_base) + (_offset)))
    2828
    2929/*PAGE
     
    3434
    3535#define _Addresses_Subtract_offset( _base, _offset ) \
    36   ((void *)(_base) - (_offset))
    37 
    38 /*PAGE
    39  *
    40  *  _Addresses_Add
    41  *
    42  *  NOTE:  The cast of an address to an unsigned32 makes this code
    43  *         dependent on an addresses being thirty two bits.
    44  */
    45 
    46 #define _Addresses_Add( _left, _right ) \
    47   ((void *)(_left) + (unsigned32)(_right))
     36  ((void *)((char *)(_base) - (_offset)))
    4837
    4938/*PAGE
  • cpukit/score/macros/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/macros/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 #define _ISR_Handler_initialization() \
    27   { \
    28     _ISR_Signals_to_thread_executing = FALSE; \
    29     _ISR_Nest_level = 0; \
    30   }
    3119
    3220/*PAGE
  • cpukit/score/macros/rtems/score/object.inl

    r5072b07 r3a4ae6c  
    3131/*PAGE
    3232 *
    33  *  rtems_get_class
     33 *  _Objects_Get_class
    3434 */
    3535 
    36 #define rtems_get_class( _id ) \
     36#define _Objects_Get_class( _id ) \
    3737  (Objects_Classes) \
    3838    (((_id) >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS)
     
    4040/*PAGE
    4141 *
    42  *  rtems_get_node
     42 *  _Objects_Get_node
    4343 *
    4444 */
    4545
    46 #define rtems_get_node( _id ) \
     46#define _Objects_Get_node( _id ) \
    4747  (((_id) >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS)
    4848
    4949/*PAGE
    5050 *
    51  *  rtems_get_index
     51 *  _Objects_Get_index
    5252 *
    5353 */
    5454
    55 #define rtems_get_index( _id ) \
     55#define _Objects_Get_index( _id ) \
    5656  (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS)
    5757
     
    8181
    8282#define _Objects_Is_local_id( _id ) \
    83   _Objects_Is_local_node( rtems_get_node(_id) )
     83  _Objects_Is_local_node( _Objects_Get_node(_id) )
    8484
    8585/*PAGE
     
    120120    unsigned32 _index; \
    121121    \
    122     _index = rtems_get_index( (_the_object)->id ); \
     122    _index = _Objects_Get_index( (_the_object)->id ); \
    123123    (_information)->local_table[ _index ] = (_the_object); \
    124124    \
     
    140140    unsigned32 _index; \
    141141    \
    142     _index = rtems_get_index( (_the_object)->id ); \
     142    _index = _Objects_Get_index( (_the_object)->id ); \
    143143    (_information)->local_table[ _index ] = NULL; \
    144144    _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \
  • cpukit/score/macros/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
     
    4141 */
    4242
     43  /*
     44   *  Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned,
     45   *  then checking for less than 0 is unnecessary.
     46   */
     47
    4348#define _Priority_Is_valid( _the_priority ) \
    44   (  ( (_the_priority) >= RTEMS_MINIMUM_PRIORITY ) && \
    45      ( (_the_priority) <= RTEMS_MAXIMUM_PRIORITY ) )
     49  (  (_the_priority) <= PRIORITY_MAXIMUM )
    4650
    4751/*PAGE
  • cpukit/score/macros/rtems/score/stack.inl

    r5072b07 r3a4ae6c  
    3737
    3838#define _Stack_Is_enough( _size ) \
    39   ( (_size) >= RTEMS_MINIMUM_STACK_SIZE )
     39  ( (_size) >= STACK_MINIMUM_SIZE )
    4040
    4141/*PAGE
  • cpukit/score/macros/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.
     
    128128/*PAGE
    129129 *
     130 *  _States_Is_waiting_for_mutex
     131 *
     132 */
     133 
     134#define _States_Is_waiting_for_mutex( _the_states ) \
     135   ( (_the_states) & STATES_WAITING_FOR_MUTEX )
     136
     137/*PAGE
     138 *
    130139 *  _States_Is_waiting_for_semaphore
    131140 *
  • cpukit/score/macros/rtems/score/sysstate.inl

    r5072b07 r3a4ae6c  
    2020/*PAGE
    2121 *
     22 *  _System_state_Handler_initialization
     23 */
     24 
     25#define _System_state_Handler_initialization( _is_multiprocessing ) \
     26  do { \
     27    _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; \
     28    _System_state_Is_multiprocessing = (_is_multiprocessing); \
     29  } while ( 0 )
     30
     31/*PAGE
     32 *
    2233 *  _System_state_Set
    2334 */
    2435
    2536#define _System_state_Set( _state ) \
    26   _System_state_Current = (_state)
     37  do { \
     38    _System_state_Current = (_state); \
     39  } while ( 0 )
    2740
    2841/*PAGE
  • cpukit/score/macros/rtems/score/thread.inl

    r5072b07 r3a4ae6c  
    190190  ( (_the_thread) == NULL )
    191191
     192/*
     193 *  _Thread_Is_proxy_blocking
     194 *
     195 */
     196 
     197#define _Thread_Is_proxy_blocking( _code ) \
     198  ( (_code) == THREAD_STATUS_PROXY_BLOCKING )
     199
    192200#endif
    193201/* end of include file */
  • cpukit/score/macros/rtems/score/userext.inl

    r5072b07 r3a4ae6c  
    4141
    4242#define _User_extensions_Add_set( _the_extension, _extension_table ) \
    43   { \
     43  do { \
    4444    (_the_extension)->Callouts = *(_extension_table); \
    4545    \
    4646    _Chain_Append( &_User_extensions_List, &(_the_extension)->Node ); \
    47   }
     47  } while ( 0 )
     48
     49/*PAGE
     50 *
     51 *  _User_extensions_Add_API_set
     52 */
     53 
     54#define _User_extensions_Add_API_set( _the_extension ) \
     55  _Chain_Prepend( &_User_extensions_List, &(_the_extension)->Node )
     56 
    4857
    4958/*PAGE
     
    107116/*PAGE
    108117 *
    109  *  _User_extensions_Task_create
     118 *  _User_extensions_Thread_switch
    110119 *
    111120 */
    112121
    113 #define _User_extensions_Task_create( _the_thread ) \
    114   _User_extensions_Run_list_forward(rtems_task_create, \
    115      (_Thread_Executing, _the_thread) )
     122#define _User_extensions_Thread_switch( _executing, _heir ) \
     123  _User_extensions_Run_list_forward(thread_switch, (_executing, _heir) )
    116124
    117125/*PAGE
    118126 *
    119  *  _User_extensions_Task_delete
     127 *  _User_extensions_Thread_post_switch
    120128 *
    121129 */
    122130
    123 #define _User_extensions_Task_delete( _the_thread ) \
    124   _User_extensions_Run_list_backward(rtems_task_delete, \
    125      (_Thread_Executing, _the_thread) )
    126 
    127 /*PAGE
    128  *
    129  *  _User_extensions_Task_start
    130  *
    131  */
    132 
    133 #define _User_extensions_Task_start( _the_thread ) \
    134   _User_extensions_Run_list_forward(rtems_task_start, \
    135      (_Thread_Executing, _the_thread) )
    136 
    137 /*PAGE
    138  *
    139  *  _User_extensions_Task_restart
    140  *
    141  */
    142 
    143 #define _User_extensions_Task_restart( _the_thread ) \
    144   _User_extensions_Run_list_forward(rtems_task_restart,\
    145       (_Thread_Executing, _the_thread) )
    146 
    147 /*PAGE
    148  *
    149  *  _User_extensions_Task_switch
    150  *
    151  */
    152 
    153 #define _User_extensions_Task_switch( _executing, _heir ) \
    154   _User_extensions_Run_list_forward(task_switch, (_executing, _heir) )
    155 
    156 /*PAGE
    157  *
    158  *  _User_extensions_Task_begin
    159  *
    160  */
    161 
    162 #define _User_extensions_Task_begin( _executing ) \
    163   _User_extensions_Run_list_forward(task_begin, (_executing) )
    164 
    165 /*PAGE
    166  *
    167  *  _User_extensions_Task_exitted
    168  *
    169  */
    170 
    171 #define _User_extensions_Task_exitted( _executing ) \
    172   _User_extensions_Run_list_backward(task_exitted, (_executing) )
    173 
    174 /*PAGE
    175  *
    176  *  _User_extensions_Fatal
    177  *
    178  */
    179 
    180 #define _User_extensions_Fatal( _the_error ) \
    181   _User_extensions_Run_list_backward(fatal, (_the_error) )
     131#define _User_extensions_Thread_post_switch( _executing ) \
     132  _User_extensions_Run_list_forward(thread_post_switch, (_executing) )
    182133
    183134#endif
  • cpukit/score/macros/rtems/score/watchdog.inl

    r5072b07 r3a4ae6c  
    1818#define __WATCHDOG_inl
    1919
    20 #include <rtems/object.h>
     20#include <rtems/core/object.h>
    2121
    2222/*PAGE
  • cpukit/score/macros/rtems/score/wkspace.inl

    r5072b07 r3a4ae6c  
    22 *
    33 *  This file contains the macro implementation of the inlined routines
    4  *  from the RTEMS RAM Workspace Handler.
     4 *  from the RAM Workspace Handler.
    55 *
    66 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
     
    1818#define __WORKSPACE_inl
    1919
    20 #include <rtems/heap.h>
    21 #include <rtems/fatal.h>
    22 #include <rtems/status.h>
    23 
    2420/*PAGE
    2521 *
     
    3430  unsigned32  memory_available; \
    3531  \
    36   if ( ((_starting_address) == NULL) ||  \
    37        !_Addresses_Is_aligned( (_starting_address) ) )  \
    38     rtems_fatal_error_occurred( RTEMS_INVALID_ADDRESS ); \
     32  if ( !(_starting_address) || !_Addresses_Is_aligned( (_starting_address) ) ) \
     33    _Internal_error_Occurred( \
     34      INTERNAL_ERROR_CORE, \
     35      TRUE, \
     36      INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS \
     37    ); \
    3938  \
    4039  if ( _CPU_Table.do_zero_of_workspace ) { \
     
    5352  \
    5453  if ( memory_available == 0 ) \
    55     rtems_fatal_error_occurred( RTEMS_UNSATISFIED ); \
     54    _Internal_error_Occurred( \
     55      INTERNAL_ERROR_CORE, \
     56      TRUE, \
     57      INTERNAL_ERROR_TOO_LITTLE_WORKSPACE \
     58    ); \
    5659}
    5760
Note: See TracChangeset for help on using the changeset viewer.