Changeset 3a4ae6c in rtems for cpukit/score/src/userext.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/userext.c

    r5072b07 r3a4ae6c  
    1616
    1717#include <rtems/system.h>
    18 #include <rtems/userext.h>
    19 
    20 /*PAGE
    21  *
    22  *  _User_extensions_Task_create
    23  */
    24 
    25 boolean _User_extensions_Task_create (
     18#include <rtems/core/userext.h>
     19
     20/*PAGE
     21 *
     22 *  _User_extensions_Thread_create
     23 */
     24
     25boolean _User_extensions_Thread_create (
    2626  Thread_Control *the_thread
    2727)
     
    3737    the_extension = (User_extensions_Control *) the_node;
    3838 
    39     if ( the_extension->Callouts.rtems_task_create != NULL ) {
    40       status = (*the_extension->Callouts.rtems_task_create)(
     39    if ( the_extension->Callouts.thread_create != NULL ) {
     40      status = (*the_extension->Callouts.thread_create)(
    4141        _Thread_Executing,
    4242        the_thread
     
    5252/*PAGE
    5353 *
    54  *  _User_extensions_Task_delete
    55  */
    56  
    57 void _User_extensions_Task_delete (
     54 *  _User_extensions_Thread_delete
     55 */
     56 
     57void _User_extensions_Thread_delete (
    5858  Thread_Control *the_thread
    5959)
     
    6868    the_extension = (User_extensions_Control *) the_node;
    6969 
    70     if ( the_extension->Callouts.rtems_task_delete != NULL )
    71       (*the_extension->Callouts.rtems_task_delete)(
    72         _Thread_Executing,
    73         the_thread
    74       );
    75   }
    76 }
    77  
    78 /*PAGE
    79  *
    80  *  _User_extensions_Task_start
    81  *
    82  */
    83  
    84 void _User_extensions_Task_start (
    85   Thread_Control *the_thread
    86 )
    87 {
    88   Chain_Node              *the_node;
    89   User_extensions_Control *the_extension;
    90  
    91   for ( the_node = _User_extensions_List.first ;
    92         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    93         the_node = the_node->next ) {
    94  
    95     the_extension = (User_extensions_Control *) the_node;
    96  
    97     if ( the_extension->Callouts.rtems_task_start != NULL )
    98       (*the_extension->Callouts.rtems_task_start)(
    99         _Thread_Executing,
    100         the_thread
    101       );
    102   }
    103 }
    104  
    105 /*PAGE
    106  *
    107  *  _User_extensions_Task_restart
    108  *
    109  */
    110  
    111 void _User_extensions_Task_restart (
    112   Thread_Control *the_thread
    113 )
    114 {
    115   Chain_Node              *the_node;
    116   User_extensions_Control *the_extension;
    117  
    118   for ( the_node = _User_extensions_List.first ;
    119         !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
    120         the_node = the_node->next ) {
    121  
    122     the_extension = (User_extensions_Control *) the_node;
    123  
    124     if ( the_extension->Callouts.rtems_task_restart != NULL )
    125       (*the_extension->Callouts.rtems_task_restart)(
    126         _Thread_Executing,
    127         the_thread
    128       );
    129   }
    130 }
    131  
    132 /*PAGE
    133  *
    134  *  _User_extensions_Task_begin
    135  *
    136  */
    137  
    138 void _User_extensions_Task_begin (
     70    if ( the_extension->Callouts.thread_delete != NULL )
     71      (*the_extension->Callouts.thread_delete)(
     72        _Thread_Executing,
     73        the_thread
     74      );
     75  }
     76}
     77 
     78/*PAGE
     79 *
     80 *  _User_extensions_Thread_start
     81 *
     82 */
     83 
     84void _User_extensions_Thread_start (
     85  Thread_Control *the_thread
     86)
     87{
     88  Chain_Node              *the_node;
     89  User_extensions_Control *the_extension;
     90 
     91  for ( the_node = _User_extensions_List.first ;
     92        !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
     93        the_node = the_node->next ) {
     94 
     95    the_extension = (User_extensions_Control *) the_node;
     96 
     97    if ( the_extension->Callouts.thread_start != NULL )
     98      (*the_extension->Callouts.thread_start)(
     99        _Thread_Executing,
     100        the_thread
     101      );
     102  }
     103}
     104 
     105/*PAGE
     106 *
     107 *  _User_extensions_Thread_restart
     108 *
     109 */
     110 
     111void _User_extensions_Thread_restart (
     112  Thread_Control *the_thread
     113)
     114{
     115  Chain_Node              *the_node;
     116  User_extensions_Control *the_extension;
     117 
     118  for ( the_node = _User_extensions_List.first ;
     119        !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
     120        the_node = the_node->next ) {
     121 
     122    the_extension = (User_extensions_Control *) the_node;
     123 
     124    if ( the_extension->Callouts.thread_restart != NULL )
     125      (*the_extension->Callouts.thread_restart)(
     126        _Thread_Executing,
     127        the_thread
     128      );
     129  }
     130}
     131 
     132/*PAGE
     133 *
     134 *  _User_extensions_Thread_begin
     135 *
     136 */
     137 
     138void _User_extensions_Thread_begin (
    139139  Thread_Control *executing
    140140)
     
    149149    the_extension = (User_extensions_Control *) the_node;
    150150 
    151     if ( the_extension->Callouts.task_begin != NULL )
    152       (*the_extension->Callouts.task_begin)( executing );
    153   }
    154 }
    155  
    156 /*PAGE
    157  *
    158  *  _User_extensions_Task_exitted
    159  */
    160  
    161 void _User_extensions_Task_exitted (
     151    if ( the_extension->Callouts.thread_begin != NULL )
     152      (*the_extension->Callouts.thread_begin)( executing );
     153  }
     154}
     155 
     156/*PAGE
     157 *
     158 *  _User_extensions_Thread_exitted
     159 */
     160 
     161void _User_extensions_Thread_exitted (
    162162  Thread_Control *executing
    163163)
     
    172172    the_extension = (User_extensions_Control *) the_node;
    173173 
    174     if ( the_extension->Callouts.task_exitted != NULL )
    175       (*the_extension->Callouts.task_exitted)( executing );
     174    if ( the_extension->Callouts.thread_exitted != NULL )
     175      (*the_extension->Callouts.thread_exitted)( executing );
    176176  }
    177177}
     
    183183 
    184184void _User_extensions_Fatal (
    185   unsigned32 the_error
     185  Internal_errors_Source  the_source,
     186  boolean                 is_internal,
     187  unsigned32              the_error
    186188)
    187189{
     
    196198 
    197199    if ( the_extension->Callouts.fatal != NULL )
    198       (*the_extension->Callouts.fatal)( the_error );
    199   }
    200 }
    201  
    202 
     200      (*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
     201  }
     202}
     203 
     204
Note: See TracChangeset for help on using the changeset viewer.