source: rtems/cpukit/score/include/rtems/sysinit.h @ 2605a489

5
Last change on this file since 2605a489 was 2605a489, checked in by Sebastian Huber <sebastian.huber@…>, on 12/15/15 at 08:32:55

Optional POSIX Keys initialization

Update #2408.

  • Property mode set to 100644
File size: 3.7 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_DATA_STRUCTURES            000301
33#define RTEMS_SYSINIT_CPU_SET                    00030d
34#define RTEMS_SYSINIT_USER_EXTENSIONS            000320
35#define RTEMS_SYSINIT_CLASSIC_TASKS              000340
36#define RTEMS_SYSINIT_CLASSIC_TIMER              000341
37#define RTEMS_SYSINIT_CLASSIC_SIGNAL             000342
38#define RTEMS_SYSINIT_CLASSIC_EVENT              000343
39#define RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE      000344
40#define RTEMS_SYSINIT_CLASSIC_SEMAPHORE          000345
41#define RTEMS_SYSINIT_CLASSIC_PARTITION          000346
42#define RTEMS_SYSINIT_CLASSIC_REGION             000347
43#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 000348
44#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC     000349
45#define RTEMS_SYSINIT_CLASSIC_BARRIER            00034a
46#define RTEMS_SYSINIT_POSIX_SIGNALS              000360
47#define RTEMS_SYSINIT_POSIX_THREADS              000361
48#define RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE   000362
49#define RTEMS_SYSINIT_POSIX_MUTEX                000363
50#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        000364
51#define RTEMS_SYSINIT_POSIX_SEMAPHORE            000365
52#define RTEMS_SYSINIT_POSIX_TIMER                000366
53#define RTEMS_SYSINIT_POSIX_BARRIER              000367
54#define RTEMS_SYSINIT_POSIX_RWLOCK               000368
55#define RTEMS_SYSINIT_POSIX_SPINLOCK             000369
56#define RTEMS_SYSINIT_POSIX_CLEANUP              00036a
57#define RTEMS_SYSINIT_POSIX_KEYS                 00036b
58#define RTEMS_SYSINIT_IDLE_THREADS               000380
59#define RTEMS_SYSINIT_BSP_LIBC                   000400
60#define RTEMS_SYSINIT_BEFORE_DRIVERS             000500
61#define RTEMS_SYSINIT_BSP_PRE_DRIVERS            000600
62#define RTEMS_SYSINIT_DEVICE_DRIVERS             000700
63#define RTEMS_SYSINIT_BSP_POST_DRIVERS           000800
64
65/*
66 * The value of each order define must consist of exactly two hexadecimal
67 * digits without a 0x-prefix.  A 0x-prefix is concatenated with the module and
68 * order values to form a proper integer literal.
69 */
70#define RTEMS_SYSINIT_ORDER_FIRST  00
71#define RTEMS_SYSINIT_ORDER_MIDDLE 08
72#define RTEMS_SYSINIT_ORDER_LAST   0f
73
74typedef void ( *rtems_sysinit_handler )( void );
75
76typedef struct {
77  rtems_sysinit_handler handler;
78} rtems_sysinit_item;
79
80/* The enum helps to detect typos in the module and order parameters */
81#define _RTEMS_SYSINIT_INDEX_ITEM( handler, index ) \
82  enum { _Sysinit_##handler = index }; \
83  RTEMS_LINKER_ROSET_ITEM_ORDERED( \
84    _Sysinit, \
85    rtems_sysinit_item, \
86    handler, \
87    index \
88  ) = { handler }
89
90/* Create index from module and order */
91#define _RTEMS_SYSINIT_ITEM( handler, module, order ) \
92  _RTEMS_SYSINIT_INDEX_ITEM( handler, 0x##module##order )
93
94/* Perform parameter expansion */
95#define RTEMS_SYSINIT_ITEM( handler, module, order ) \
96  _RTEMS_SYSINIT_ITEM( handler, module, order )
97
98#ifdef __cplusplus
99}
100#endif /* __cplusplus */
101
102#endif /* _RTEMS_SYSINIT_H */
Note: See TracBrowser for help on using the repository browser.