Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Intel Corporation
3
* Copyright (c) 2017 ARM Ltd
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_TYPES_H_
9
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_TYPES_H_
10
11
#include <
stdint.h
>
12
#include <
sys/_types.h
>
13
14
typedef
unsigned
int
mode_t
;
15
16
#if !defined(__ssize_t_defined)
17
#define __ssize_t_defined
18
19
/* Static code analysis tool can raise a violation
20
* in the line below where name of macro 'unsigned' is the same
21
* as keyword. It is made on purpose, deliberated deviation.
22
*
23
* We trick compiler to make sure the type of ssize_t won't be unsigned long.
24
* As otherwise the type of ssize_t will be unsigned long
25
* which is not correct. More details view in commit b889120
26
*/
27
#define unsigned signed
/* parasoft-suppress MISRAC2012-RULE_20_4-a MISRAC2012-RULE_20_4-b */
28
typedef
__SIZE_TYPE__
ssize_t
;
29
#undef unsigned
30
31
#endif
32
33
#if !defined(__off_t_defined)
34
#define __off_t_defined
35
/* off_t is defined such that it matches the size of a pointer */
36
typedef
__INTPTR_TYPE__
off_t
;
37
#endif
38
39
#if !defined(__time_t_defined)
40
#define __time_t_defined
41
typedef
_TIME_T_
time_t
;
42
#endif
43
44
#if !defined(__suseconds_t_defined)
45
#define __suseconds_t_defined
46
typedef
_SUSECONDS_T_
suseconds_t
;
47
#endif
48
49
#if !defined(__mem_word_t_defined)
50
#define __mem_word_t_defined
51
52
/*
53
* The mem_word_t should match the optimal memory access word width
54
* on the target platform. Here we defaults it to uintptr_t.
55
*/
56
57
typedef
uintptr_t
mem_word_t
;
58
59
#define Z_MEM_WORD_T_WIDTH __INTPTR_WIDTH__
60
61
#endif
62
63
#endif
/* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_TYPES_H_ */
_types.h
mem_word_t
uintptr_t mem_word_t
Definition:
types.h:57
ssize_t
__SIZE_TYPE__ ssize_t
Definition:
types.h:28
off_t
__INTPTR_TYPE__ off_t
Definition:
types.h:36
time_t
_TIME_T_ time_t
Definition:
types.h:41
suseconds_t
_SUSECONDS_T_ suseconds_t
Definition:
types.h:46
mode_t
unsigned int mode_t
Definition:
types.h:14
stdint.h
uintptr_t
__UINTPTR_TYPE__ uintptr_t
Definition:
stdint.h:105
lib
libc
minimal
include
sys
types.h
Generated on Thu Sep 19 2024 15:34:52 for Zephyr API Documentation by
1.9.6