OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [src/] [apiext.c] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  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.OARcorp.com/rtems/license.html.
11
 *
12
 *  apiext.c,v 1.8 1999/11/17 17:50:38 joel Exp
13
 */
14
 
15
 
16
#include <rtems/system.h>
17
#include <rtems/score/apiext.h>
18
 
19
/*PAGE
20
 *
21
 *  _API_extensions_Initialization
22
 */
23
 
24
void _API_extensions_Initialization( void )
25
{
26
 _Chain_Initialize_empty( &_API_extensions_List );
27
}
28
 
29
/*PAGE
30
 *
31
 *  _API_extensions_Add
32
 */
33
 
34
void _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
 
46
void _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
 
67
void _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
 
88
void _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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.