Zephyr API Documentation
4.0.0
A Scalable Open Source RTOS
4.0.0
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
►
arch
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
posix
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Linaro Limited
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_ZEPHYR_TYPES_H_
8
#define ZEPHYR_INCLUDE_ZEPHYR_TYPES_H_
9
10
#include <stddef.h>
11
#include <
stdint.h
>
12
13
#ifdef __cplusplus
14
extern
"C"
{
15
#endif
16
17
/*
18
* A type with strong alignment requirements, similar to C11 max_align_t. It can
19
* be used to force alignment of data structures allocated on the stack or as
20
* return * type for heap allocators.
21
*/
22
typedef
union
{
23
long
long
thelonglong;
24
long
double
thelongdouble;
25
uintmax_t
theuintmax_t;
26
size_t
thesize_t;
27
uintptr_t
theuintptr_t;
28
void
*thepvoid;
29
void (*thepfunc)(void);
30
} z_max_align_t;
31
32
/*
33
* Thread local variables are declared with different keywords depending on
34
* which C/C++ standard that is used. C++11 and C23 uses "thread_local" whilst
35
* C11 uses "_Thread_local". Previously the GNU "__thread" keyword was used
36
* which is the same in both gcc and g++.
37
*/
38
#ifndef Z_THREAD_LOCAL
39
#if defined(__cplusplus) && (__cplusplus) >= 201103L
/* C++11 */
40
#define Z_THREAD_LOCAL thread_local
41
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__) >= 202311L
/* C23 */
42
#define Z_THREAD_LOCAL thread_local
43
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__) >= 201112L
/* C11 */
44
#define Z_THREAD_LOCAL _Thread_local
45
#else
/* Default back to old behavior which used the GNU keyword. */
46
#define Z_THREAD_LOCAL __thread
47
#endif
48
#endif
/* Z_THREAD_LOCAL */
49
50
#ifdef __cplusplus
51
/* Zephyr requires an int main(void) signature with C linkage for the application main if present */
52
extern
int
main(
void
);
53
#endif
54
55
#ifdef __cplusplus
56
}
57
#endif
58
59
#endif
/* ZEPHYR_INCLUDE_ZEPHYR_TYPES_H_ */
stdint.h
uintptr_t
__UINTPTR_TYPE__ uintptr_t
Definition
stdint.h:105
uintmax_t
__UINT64_TYPE__ uintmax_t
Definition
stdint.h:92
zephyr
types.h
Generated on Sat Nov 16 2024 04:55:04 for Zephyr API Documentation by
1.12.0