source: rtems/cpukit/score/src/apiext.c @ 25f5730f

4.115
Last change on this file since 25f5730f was 8061f56, checked in by Sebastian Huber <sebastian.huber@…>, on 03/14/14 at 10:55:28

score: Delete post-switch API extensions

Use thread post-switch actions instead.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @brief Holding for API Extension Functions
5 *
6 * @ingroup ScoreAPIExtension
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/system.h>
23#include <rtems/score/apiext.h>
24
25void _API_extensions_Initialization( void )
26{
27 _Chain_Initialize_empty( &_API_extensions_List );
28}
29
30void _API_extensions_Add(
31  API_extensions_Control *the_extension
32)
33{
34  _Chain_Append( &_API_extensions_List, &the_extension->Node );
35}
36
37#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
38
39  void _API_extensions_Run_predriver( void )
40  {
41    Chain_Node             *the_node;
42    API_extensions_Control *the_extension;
43
44    for ( the_node = _Chain_First( &_API_extensions_List );
45          !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
46          the_node = the_node->next ) {
47
48      the_extension = (API_extensions_Control *) the_node;
49
50      if ( the_extension->predriver_hook )
51        (*the_extension->predriver_hook)();
52    }
53  }
54#endif
55
56void _API_extensions_Run_postdriver( void )
57{
58  Chain_Node             *the_node;
59  API_extensions_Control *the_extension;
60
61  for ( the_node = _Chain_First( &_API_extensions_List );
62        !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
63        the_node = the_node->next ) {
64
65    the_extension = (API_extensions_Control *) the_node;
66
67    /*
68     *  Currently all APIs configure this hook so it is always non-NULL.
69     */
70#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
71    if ( the_extension->postdriver_hook )
72#endif
73      (*the_extension->postdriver_hook)();
74  }
75}
Note: See TracBrowser for help on using the repository browser.