source: rtems/cpukit/score/src/apiext.c @ 37c7bfcb

4.104.114.84.95
Last change on this file since 37c7bfcb was a8eed23, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/27/05 at 05:57:05

Include config.h.

  • 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#if HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems/system.h>
20#include <rtems/score/apiext.h>
21
22/*PAGE
23 *
24 *  _API_extensions_Initialization
25 */
26
27void _API_extensions_Initialization( void )
28{
29 _Chain_Initialize_empty( &_API_extensions_List );
30}
31
32/*PAGE
33 *
34 *  _API_extensions_Add
35 */
36
37void _API_extensions_Add(
38  API_extensions_Control *the_extension
39)
40{
41  _Chain_Append( &_API_extensions_List, &the_extension->Node );
42}
43
44/*PAGE
45 *
46 *  _API_extensions_Run_predriver
47 */
48
49void _API_extensions_Run_predriver( void )
50{
51  Chain_Node             *the_node;
52  API_extensions_Control *the_extension;
53
54  for ( the_node = _API_extensions_List.first ;
55        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
56        the_node = the_node->next ) {
57
58    the_extension = (API_extensions_Control *) the_node;
59
60    if ( the_extension->predriver_hook )
61      (*the_extension->predriver_hook)();
62  }
63}
64
65/*PAGE
66 *
67 *  _API_extensions_Run_postdriver
68 */
69
70void _API_extensions_Run_postdriver( void )
71{
72  Chain_Node             *the_node;
73  API_extensions_Control *the_extension;
74
75  for ( the_node = _API_extensions_List.first ;
76        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
77        the_node = the_node->next ) {
78
79    the_extension = (API_extensions_Control *) the_node;
80
81    if ( the_extension->postdriver_hook )
82      (*the_extension->postdriver_hook)();
83  }
84}
85
86/*PAGE
87 *
88 *  _API_extensions_Run_postswitch
89 */
90
91void _API_extensions_Run_postswitch( void )
92{
93  Chain_Node             *the_node;
94  API_extensions_Control *the_extension;
95
96  for ( the_node = _API_extensions_List.first ;
97        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
98        the_node = the_node->next ) {
99
100    the_extension = (API_extensions_Control *) the_node;
101
102    if ( the_extension->postswitch_hook )
103      (*the_extension->postswitch_hook)( _Thread_Executing );
104  }
105}
106
107/* end of file */
Note: See TracBrowser for help on using the repository browser.