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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [src/] [apiext.c] - Blame information for rev 778

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

Line No. Rev Author Line
1 30 unneback
/*  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
 *  $Id: apiext.c,v 1.2 2001-09-27 11:59:34 chris 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.