RTEMS
5.0.0
cpukit
include
rtems
sysinit.h
1
/*
2
* Copyright (c) 2015, 2018 embedded brains GmbH. All rights reserved.
3
*
4
* embedded brains GmbH
5
* Dornierstr. 4
6
* 82178 Puchheim
7
* Germany
8
* <rtems@embedded-brains.de>
9
*
10
* The license and distribution terms for this file may be
11
* found in the file LICENSE in this distribution or at
12
* http://www.rtems.org/license/LICENSE.
13
*/
14
15
#ifndef _RTEMS_SYSINIT_H
16
#define _RTEMS_SYSINIT_H
17
18
#include <rtems/linkersets.h>
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
/* __cplusplus */
23
24
/*
25
* The value of each module define must consist of exactly six hexadecimal
26
* digits without a 0x-prefix. A 0x-prefix is concatenated with the module and
27
* order values to form a proper integer literal.
28
*/
29
#define RTEMS_SYSINIT_BSP_WORK_AREAS 000100
30
#define RTEMS_SYSINIT_BSP_START 000200
31
#define RTEMS_SYSINIT_CPU_COUNTER 000300
32
#define RTEMS_SYSINIT_INITIAL_EXTENSIONS 000400
33
#define RTEMS_SYSINIT_MP_EARLY 000500
34
#define RTEMS_SYSINIT_DATA_STRUCTURES 000600
35
#define RTEMS_SYSINIT_MP 000700
36
#define RTEMS_SYSINIT_RECORD 000800
37
#define RTEMS_SYSINIT_USER_EXTENSIONS 000900
38
#define RTEMS_SYSINIT_CLASSIC_TASKS 000a00
39
#define RTEMS_SYSINIT_CLASSIC_TIMER 000b00
40
#define RTEMS_SYSINIT_CLASSIC_SIGNAL 000c00
41
#define RTEMS_SYSINIT_CLASSIC_EVENT 000d00
42
#define RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE 000e00
43
#define RTEMS_SYSINIT_CLASSIC_SEMAPHORE 000f00
44
#define RTEMS_SYSINIT_CLASSIC_PARTITION 001000
45
#define RTEMS_SYSINIT_CLASSIC_REGION 001100
46
#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 001200
47
#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC 001300
48
#define RTEMS_SYSINIT_CLASSIC_BARRIER 001400
49
#define RTEMS_SYSINIT_POSIX_SIGNALS 001500
50
#define RTEMS_SYSINIT_POSIX_THREADS 001600
51
#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE 001700
52
#define RTEMS_SYSINIT_POSIX_SEMAPHORE 001800
53
#define RTEMS_SYSINIT_POSIX_TIMER 001900
54
#define RTEMS_SYSINIT_POSIX_SHM 001a00
55
#define RTEMS_SYSINIT_POSIX_KEYS 001b00
56
#define RTEMS_SYSINIT_POSIX_CLEANUP 001c00
57
#define RTEMS_SYSINIT_IDLE_THREADS 001d00
58
#define RTEMS_SYSINIT_LIBIO 001e00
59
#define RTEMS_SYSINIT_ROOT_FILESYSTEM 001f00
60
#define RTEMS_SYSINIT_DRVMGR 002000
61
#define RTEMS_SYSINIT_MP_SERVER 002100
62
#define RTEMS_SYSINIT_BSP_PRE_DRIVERS 002200
63
#define RTEMS_SYSINIT_DRVMGR_LEVEL_1 002300
64
#define RTEMS_SYSINIT_DEVICE_DRIVERS 002400
65
#define RTEMS_SYSINIT_DRVMGR_LEVEL_2 002500
66
#define RTEMS_SYSINIT_DRVMGR_LEVEL_3 002600
67
#define RTEMS_SYSINIT_DRVMGR_LEVEL_4 002700
68
#define RTEMS_SYSINIT_MP_FINALIZE 002800
69
#define RTEMS_SYSINIT_CLASSIC_USER_TASKS 002900
70
#define RTEMS_SYSINIT_POSIX_USER_THREADS 002a00
71
#define RTEMS_SYSINIT_STD_FILE_DESCRIPTORS 002b00
72
#define RTEMS_SYSINIT_LAST ffffff
73
74
/*
75
* The value of each order define must consist of exactly two hexadecimal
76
* digits without a 0x-prefix. A 0x-prefix is concatenated with the module and
77
* order values to form a proper integer literal.
78
*/
79
#define RTEMS_SYSINIT_ORDER_FIRST 00
80
#define RTEMS_SYSINIT_ORDER_SECOND 01
81
#define RTEMS_SYSINIT_ORDER_THIRD 02
82
#define RTEMS_SYSINIT_ORDER_FOURTH 03
83
#define RTEMS_SYSINIT_ORDER_FIFTH 04
84
#define RTEMS_SYSINIT_ORDER_SIXTH 05
85
#define RTEMS_SYSINIT_ORDER_SEVENTH 06
86
#define RTEMS_SYSINIT_ORDER_EIGHTH 07
87
#define RTEMS_SYSINIT_ORDER_NINETH 08
88
#define RTEMS_SYSINIT_ORDER_TENTH 09
89
#define RTEMS_SYSINIT_ORDER_MIDDLE 80
90
#define RTEMS_SYSINIT_ORDER_LAST ff
91
92
typedef
void ( *rtems_sysinit_handler )( void );
93
94
typedef
struct
{
95
rtems_sysinit_handler handler;
96
}
rtems_sysinit_item
;
97
98
/* The enum helps to detect typos in the module and order parameters */
99
#define _RTEMS_SYSINIT_INDEX_ITEM( handler, index ) \
100
enum { _Sysinit_##handler = index }; \
101
RTEMS_LINKER_ROSET_ITEM_ORDERED( \
102
_Sysinit, \
103
rtems_sysinit_item, \
104
handler, \
105
index \
106
) = { handler }
107
108
/* Create index from module and order */
109
#define _RTEMS_SYSINIT_ITEM( handler, module, order ) \
110
_RTEMS_SYSINIT_INDEX_ITEM( handler, 0x##module##order )
111
112
/* Perform parameter expansion */
113
#define RTEMS_SYSINIT_ITEM( handler, module, order ) \
114
_RTEMS_SYSINIT_ITEM( handler, module, order )
115
116
#ifdef __cplusplus
117
}
118
#endif
/* __cplusplus */
119
120
#endif
/* _RTEMS_SYSINIT_H */
rtems_sysinit_item
Definition:
sysinit.h:94
Generated by
1.8.13