RTEMS
5.0.0
cpukit
include
rtems
inttypes.h
Go to the documentation of this file.
1
12
/*
13
* COPYRIGHT (c) 2017 On-Line Applications Research Corporation.
14
*
15
* The license and distribution terms for this file may be
16
* found in the file LICENSE in this distribution or at
17
* http://www.rtems.org/license/LICENSE.
18
*/
19
20
#ifndef _RTEMS_INTTYPES_H
21
#define _RTEMS_INTTYPES_H
22
23
#include <
inttypes.h
>
24
#include <rtems/score/cpuopts.h>
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
38
#if __RTEMS_SIZEOF_MODE_T__ == 8
39
#define PRIomode_t PRIo64
40
#elif __RTEMS_SIZEOF_MODE_T__ == 4
41
#define PRIomode_t PRIo32
42
#else
43
#error "PRIomode_t: unsupported size of mode_t"
44
#endif
45
47
#if __RTEMS_SIZEOF_OFF_T__ == 8
48
#define PRIooff_t PRIo64
49
#elif __RTEMS_SIZEOF_OFF_T__ == 4
50
#define PRIooff_t PRIo32
51
#else
52
#error "PRIooff_t: unsupported size of off_t"
53
#endif
54
56
#if __RTEMS_SIZEOF_OFF_T__ == 8
57
#define PRIdoff_t PRId64
58
#elif __RTEMS_SIZEOF_OFF_T__ == 4
59
#define PRIdoff_t PRId32
60
#else
61
#error "PRIdoff_t: unsupported size of off_t"
62
#endif
63
65
#if __RTEMS_SIZEOF_TIME_T__ == 8
66
#define PRIdtime_t PRId64
67
#elif __RTEMS_SIZEOF_TIME_T__ == 4
68
#define PRIdtime_t PRId32
69
#else
70
#error "PRIdtime_t: unsupported size of time_t"
71
#endif
72
74
#if __RTEMS_SIZEOF_BLKSIZE_T__ == 8
75
#define PRIxblksize_t PRIx64
76
#elif __RTEMS_SIZEOF_BLKSIZE_T__ == 4
77
#define PRIxblksize_t PRIx32
78
#else
79
/* Warn and fall back to "long" */
80
#warning "unsupported size of blksize_t"
81
#define PRIxblksize_t "lx"
82
#endif
83
85
#if __RTEMS_SIZEOF_BLKCNT_T__ == 8
86
#define PRIxblkcnt_t PRIx64
87
#elif __RTEMS_SIZEOF_BLKCNT_T__ == 4
88
#define PRIxblkcnt_t PRIx32
89
#else
90
/* Warn and fall back to "long" */
91
#warning "unsupported size of blkcnt_t"
92
#define PRIxblkcnt_t "lx"
93
#endif
94
95
/*
96
* Various inttypes.h-stype macros to assist printing
97
* certain system types on different targets.
98
*/
99
100
#define PRIxrtems_id PRIx32
101
102
/* c.f. cpukit/score/include/rtems/score/priority.h */
103
#define PRIdPriority_Control PRIu64
104
#define PRIxPriority_Control PRIx64
105
/* rtems_task_priority is a typedef to Priority_Control */
106
#define PRIdrtems_task_priority PRIu32
107
#define PRIxrtems_task_priority PRIx32
108
109
/* c.f. cpukit/score/include/rtems/score/watchdog.h */
110
#define PRIdWatchdog_Interval PRIu32
111
/* rtems_interval is a typedef to Watchdog_Interval */
112
#define PRIdrtems_interval PRIdWatchdog_Interval
113
114
/* c.f. cpukit/score/include/rtems/score/thread.h */
115
#define PRIdThread_Entry_numeric_type PRIuPTR
116
/* rtems_task_argument is a typedef to Thread_Entry_numeric_type */
117
#define PRIdrtems_task_argument PRIdThread_Entry_numeric_type
118
119
/* rtems_event_set is a typedef to uint32_t */
120
#define PRIxrtems_event_set PRIx32
121
122
/* newlib defines pthread_t as a typedef to __uint32_t which matches
123
* RTEMS expectations for an Object ID.
124
*/
125
#define PRIxpthread_t PRIx32
126
127
/* rtems_signal_set is a typedef to uint32_t */
128
#define PRIxrtems_signal_set PRIx32
129
130
/* newlib's ino_t is a typedef to __uint64_t */
131
#define PRIuino_t PRIu64
132
133
/* newlib's ino_t is a typedef to __uint64_t */
134
#define PRIxino_t PRIx64
135
136
/* ioctl_command_t */
137
#define PRIdioctl_command_t "ld"
138
139
/* rtems_blkdev_bnum */
140
#define PRIdrtems_blkdev_bnum PRId32
141
142
/* rtems_blkdev_bnum */
143
#define PRIdrtems_blkdev_bnum PRId32
144
145
/* rtems_vector_number */
146
#define PRIdrtems_vector_number PRId32
147
150
#ifdef __cplusplus
151
}
152
#endif
153
154
#endif
inttypes.h
Provide printf() PRIxxx Constante Beyond Standards.
Generated by
1.8.13