source: rtems/cpukit/score/src/apiext.c @ 2bc236ba

4.104.114.84.95
Last change on this file since 2bc236ba was 05279b84, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/17/04 at 13:32:13

Remove stray white spaces.

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