source: rtems/cpukit/score/include/rtems/score/apiext.h @ 89f8eab5

4.115
Last change on this file since 89f8eab5 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: 3.3 KB
Line 
1/**
2 *  @file  rtems/score/apiext.h
3 *
4 *  @brief API Extensions Handler
5 *
6 *  This is the API Extensions Handler.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2009.
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#ifndef _RTEMS_SCORE_APIEXT_H
19#define _RTEMS_SCORE_APIEXT_H
20
21#include <rtems/score/chainimpl.h>
22#include <rtems/score/thread.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 *  @defgroup ScoreAPIExtension API Extension Handler
30 *
31 *  @ingroup Score
32 *
33 *  This handler encapsulates functionality which provides mechanisms for the
34 *  SuperCore to perform API specific actions without there beingg
35 *  "up-references" from the SuperCore to APIs.  If these referencesg
36 *  were allowed in the implementation, the cohesion would be too high
37 *  and adding an API would be more difficult.  The SuperCore is supposed
38 *  to be largely independent of any API.
39 */
40/**@{*/
41
42#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
43  /**
44   *  This type defines the prototype of the Predriver Hook.
45   */
46  typedef void (*API_extensions_Predriver_hook)(void);
47#endif
48
49/**
50 *  This type defines the prototype of the Postdriver Hook.
51 */
52typedef void (*API_extensions_Postdriver_hook)(void);
53
54/**
55 *  The control structure which defines the points at which an API
56 *  can add an extension to the system initialization thread.
57 */
58typedef struct {
59  /** This field allows this structure to be used with the Chain Handler. */
60  Chain_Node                      Node;
61  #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
62    /**
63     * This field is the callout invoked during RTEMS initialization after
64     * RTEMS data structures are initialized before device driver initialization
65     * has occurred.
66     *
67     * @note If this field is NULL, no extension is invoked.
68     */
69    API_extensions_Predriver_hook   predriver_hook;
70  #endif
71  /**
72   * This field is the callout invoked during RTEMS initialization after
73   * RTEMS data structures and device driver initialization has occurred
74   * but before multitasking is initiated.
75   *
76   * @note If this field is NULL, no extension is invoked.
77   */
78  API_extensions_Postdriver_hook  postdriver_hook;
79}  API_extensions_Control;
80
81/**
82 *  This is the list of API extensions to the system initialization.
83 */
84SCORE_EXTERN Chain_Control _API_extensions_List;
85
86/**
87 *  @brief Initialize the API extensions handler.
88 *
89 *  This routine initializes the API extension handler.
90 */
91void _API_extensions_Initialization( void );
92
93/**
94 *  @brief Add extension set to the active set.
95 *
96 *  This routine adds @a the_extension to the active set of API extensions.
97 *
98 *  @param[in] the_extension is the extension set to add.
99 */
100void _API_extensions_Add(
101  API_extensions_Control *the_extension
102);
103
104#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
105/**
106 *  @brief Execute all pre-driver extensions.
107 *
108 *  This routine executes all of the predriver callouts.
109 */
110  void _API_extensions_Run_predriver( void );
111#endif
112
113/**
114 *  @brief Execute all post-driver extensions.
115 *
116 *  This routine executes all of the postdriver callouts.
117 */
118void _API_extensions_Run_postdriver( void );
119
120/**@}*/
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif
127/* end of include file */
Note: See TracBrowser for help on using the repository browser.