source: rtems/c/src/exec/score/src/apiext.c @ 9db72b4

4.104.114.84.95
Last change on this file since 9db72b4 was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*  apiext.c
2 *
3 *  XXX
4 *
5 *  COPYRIGHT (c) 1989-1997.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
8 *
9 *  The license and distribution terms for this file may in
10 *  the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16
17#include <rtems/system.h>
18#include <rtems/score/apiext.h>
19
20/*PAGE
21 *
22 *  _API_extensions_Initialization
23 */
24 
25void _API_extensions_Initialization( void )
26{
27 _Chain_Initialize_empty( &_API_extensions_List );
28}
29 
30/*PAGE
31 *
32 *  _API_extensions_Add
33 */
34 
35void _API_extensions_Add(
36  API_extensions_Control *the_extension
37)
38{
39  _Chain_Append( &_API_extensions_List, &the_extension->Node );
40}
41
42/*PAGE
43 *
44 *  _API_extensions_Run_predriver
45 */
46
47void _API_extensions_Run_predriver( void )
48{
49  Chain_Node             *the_node;
50  API_extensions_Control *the_extension;
51 
52  for ( the_node = _API_extensions_List.first ;
53        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
54        the_node = the_node->next ) {
55 
56    the_extension = (API_extensions_Control *) the_node;
57 
58    if ( the_extension->predriver_hook )
59      (*the_extension->predriver_hook)();
60  }
61}
62
63/*PAGE
64 *
65 *  _API_extensions_Run_postdriver
66 */
67
68void _API_extensions_Run_postdriver( void )
69{
70  Chain_Node             *the_node;
71  API_extensions_Control *the_extension;
72 
73  for ( the_node = _API_extensions_List.first ;
74        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
75        the_node = the_node->next ) {
76 
77    the_extension = (API_extensions_Control *) the_node;
78 
79    if ( the_extension->postdriver_hook )
80      (*the_extension->postdriver_hook)();
81  }
82}
83
84/*PAGE
85 *
86 *  _API_extensions_Run_postswitch
87 */
88
89void _API_extensions_Run_postswitch( void )
90{
91  Chain_Node             *the_node;
92  API_extensions_Control *the_extension;
93 
94  for ( the_node = _API_extensions_List.first ;
95        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
96        the_node = the_node->next ) {
97 
98    the_extension = (API_extensions_Control *) the_node;
99 
100    if ( the_extension->postswitch_hook )
101      (*the_extension->postswitch_hook)( _Thread_Executing );
102  }
103}
104
105/* end of file */
Note: See TracBrowser for help on using the repository browser.