source: rtems/cpukit/score/include/rtems/sysinit.h @ 89fc9345

5
Last change on this file since 89fc9345 was 89fc9345, checked in by Sebastian Huber <sebastian.huber@…>, on 09/21/17 at 13:42:45

posix: Implement self-contained POSIX rwlocks

POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3115.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1/*
2 * Copyright (c) 2015 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
21extern "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_INITIAL_EXTENSIONS         000300
32#define RTEMS_SYSINIT_MP_EARLY                   000301
33#define RTEMS_SYSINIT_DATA_STRUCTURES            000302
34#define RTEMS_SYSINIT_CPU_SET                    00030d
35#define RTEMS_SYSINIT_MP                         00030e
36#define RTEMS_SYSINIT_USER_EXTENSIONS            000320
37#define RTEMS_SYSINIT_CLASSIC_TASKS              000340
38#define RTEMS_SYSINIT_CLASSIC_TIMER              000341
39#define RTEMS_SYSINIT_CLASSIC_SIGNAL             000342
40#define RTEMS_SYSINIT_CLASSIC_EVENT              000343
41#define RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE      000344
42#define RTEMS_SYSINIT_CLASSIC_SEMAPHORE          000345
43#define RTEMS_SYSINIT_CLASSIC_PARTITION          000346
44#define RTEMS_SYSINIT_CLASSIC_REGION             000347
45#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 000348
46#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC     000349
47#define RTEMS_SYSINIT_CLASSIC_BARRIER            00034a
48#define RTEMS_SYSINIT_POSIX_SIGNALS              000360
49#define RTEMS_SYSINIT_POSIX_THREADS              000361
50#define RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE   000362
51#define RTEMS_SYSINIT_POSIX_MUTEX                000363
52#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        000364
53#define RTEMS_SYSINIT_POSIX_SEMAPHORE            000365
54#define RTEMS_SYSINIT_POSIX_TIMER                000366
55#define RTEMS_SYSINIT_POSIX_SHM                  000369
56#define RTEMS_SYSINIT_POSIX_KEYS                 00036a
57#define RTEMS_SYSINIT_POSIX_CLEANUP              00036b
58#define RTEMS_SYSINIT_IDLE_THREADS               000380
59#define RTEMS_SYSINIT_LIBIO                      000400
60#define RTEMS_SYSINIT_ROOT_FILESYSTEM            000401
61#define RTEMS_SYSINIT_DRVMGR                     000500
62#define RTEMS_SYSINIT_MP_SERVER                  000501
63#define RTEMS_SYSINIT_BSP_PRE_DRIVERS            000600
64#define RTEMS_SYSINIT_DRVMGR_LEVEL_1             000700
65#define RTEMS_SYSINIT_DEVICE_DRIVERS             000701
66#define RTEMS_SYSINIT_DRVMGR_LEVEL_2             000702
67#define RTEMS_SYSINIT_DRVMGR_LEVEL_3             000703
68#define RTEMS_SYSINIT_DRVMGR_LEVEL_4             000704
69#define RTEMS_SYSINIT_MP_FINALIZE                000705
70#define RTEMS_SYSINIT_CLASSIC_USER_TASKS         000706
71#define RTEMS_SYSINIT_POSIX_USER_THREADS         000707
72#define RTEMS_SYSINIT_STD_FILE_DESCRIPTORS       000800
73#define RTEMS_SYSINIT_LAST                       ffffff
74
75/*
76 * The value of each order define must consist of exactly two hexadecimal
77 * digits without a 0x-prefix.  A 0x-prefix is concatenated with the module and
78 * order values to form a proper integer literal.
79 */
80#define RTEMS_SYSINIT_ORDER_FIRST   00
81#define RTEMS_SYSINIT_ORDER_SECOND  01
82#define RTEMS_SYSINIT_ORDER_THIRD   02
83#define RTEMS_SYSINIT_ORDER_FOURTH  03
84#define RTEMS_SYSINIT_ORDER_FIFTH   04
85#define RTEMS_SYSINIT_ORDER_SIXTH   05
86#define RTEMS_SYSINIT_ORDER_SEVENTH 06
87#define RTEMS_SYSINIT_ORDER_EIGHTH  07
88#define RTEMS_SYSINIT_ORDER_NINETH  08
89#define RTEMS_SYSINIT_ORDER_TENTH   09
90#define RTEMS_SYSINIT_ORDER_MIDDLE  80
91#define RTEMS_SYSINIT_ORDER_LAST    ff
92
93typedef void ( *rtems_sysinit_handler )( void );
94
95typedef struct {
96  rtems_sysinit_handler handler;
97} rtems_sysinit_item;
98
99/* The enum helps to detect typos in the module and order parameters */
100#define _RTEMS_SYSINIT_INDEX_ITEM( handler, index ) \
101  enum { _Sysinit_##handler = index }; \
102  RTEMS_LINKER_ROSET_ITEM_ORDERED( \
103    _Sysinit, \
104    rtems_sysinit_item, \
105    handler, \
106    index \
107  ) = { handler }
108
109/* Create index from module and order */
110#define _RTEMS_SYSINIT_ITEM( handler, module, order ) \
111  _RTEMS_SYSINIT_INDEX_ITEM( handler, 0x##module##order )
112
113/* Perform parameter expansion */
114#define RTEMS_SYSINIT_ITEM( handler, module, order ) \
115  _RTEMS_SYSINIT_ITEM( handler, module, order )
116
117#ifdef __cplusplus
118}
119#endif /* __cplusplus */
120
121#endif /* _RTEMS_SYSINIT_H */
Note: See TracBrowser for help on using the repository browser.