Zephyr API Documentation
4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
errno_private.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 Intel Corporation.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_SYS_ERRNO_PRIVATE_H_
8
#define ZEPHYR_INCLUDE_SYS_ERRNO_PRIVATE_H_
9
10
#include <
zephyr/toolchain.h
>
11
#include <
zephyr/types.h
>
/* For Z_THREAD_LOCAL */
12
13
#ifdef __cplusplus
14
extern
"C"
{
15
#endif
16
17
/* NOTE: located here to avoid include dependency loops between errno.h
18
* and kernel.h
19
*/
20
21
#ifdef CONFIG_LIBC_ERRNO
22
#include <
errno.h
>
23
24
static
inline
int
*z_errno(
void
)
25
{
26
return
&
errno
;
27
}
28
29
#elif defined(CONFIG_ERRNO_IN_TLS)
30
extern
Z_THREAD_LOCAL
int
z_errno_var;
31
32
static
inline
int
*z_errno(
void
)
33
{
34
return
&z_errno_var;
35
}
36
#else
45
__syscall
int
*z_errno(
void
);
46
47
#endif
/* CONFIG_ERRNO_IN_TLS */
48
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#if !defined(CONFIG_ERRNO_IN_TLS) && !defined(CONFIG_LIBC_ERRNO)
54
#include <zephyr/syscalls/errno_private.h>
55
#endif
/* CONFIG_ERRNO_IN_TLS */
56
57
#endif
/* ZEPHYR_INCLUDE_SYS_ERRNO_PRIVATE_H_ */
errno.h
System error numbers.
errno
#define errno
Definition
errno.h:37
types.h
toolchain.h
Macros to abstract toolchain specific capabilities.
zephyr
sys
errno_private.h
Generated on Sat Nov 9 2024 00:03:13 for Zephyr API Documentation by
1.12.0