Skip to content

Commit 06f8a2f

Browse files
committed
Added atomics types
1 parent 955571e commit 06f8a2f

File tree

1 file changed

+64
-1
lines changed
  • wamr-sdk/app/libc-builtin-sysroot/include

1 file changed

+64
-1
lines changed

wamr-sdk/app/libc-builtin-sysroot/include/stdint.h

+64-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,44 @@ typedef unsigned short int uint16_t;
2929
typedef unsigned int uint32_t;
3030
typedef unsigned long long int uint64_t;
3131

32+
/* For atomics */
33+
typedef int8_t int_fast8_t;
34+
typedef int64_t int_fast64_t;
35+
36+
typedef int8_t int_least8_t;
37+
typedef int16_t int_least16_t;
38+
typedef int32_t int_least32_t;
39+
typedef int64_t int_least64_t;
40+
41+
typedef uint8_t uint_fast8_t;
42+
typedef uint64_t uint_fast64_t;
43+
44+
typedef uint8_t uint_least8_t;
45+
typedef uint16_t uint_least16_t;
46+
typedef uint32_t uint_least32_t;
47+
typedef uint64_t uint_least64_t;
48+
typedef int16_t int_fast16_t;
49+
typedef int32_t int_fast32_t;
50+
typedef uint16_t uint_fast16_t;
51+
typedef uint32_t uint_fast32_t;
52+
53+
typedef int64_t intmax_t;
54+
typedef uint64_t uintmax_t;
55+
56+
#define INT_FAST16_MIN INT16_MIN
57+
#define INT_FAST32_MIN INT32_MIN
58+
59+
#define INT_FAST16_MAX INT16_MAX
60+
#define INT_FAST32_MAX INT32_MAX
61+
62+
#define UINT_FAST16_MAX UINT16_MAX
63+
#define UINT_FAST32_MAX UINT32_MAX
64+
65+
#define PTRDIFF_MIN INT32_MIN
66+
#define PTRDIFF_MAX INT32_MAX
67+
68+
69+
3270
typedef __INTPTR_TYPE__ intptr_t;
3371
typedef __UINTPTR_TYPE__ uintptr_t;
3472

@@ -82,10 +120,35 @@ typedef __UINTPTR_TYPE__ uintptr_t;
82120
#define SIZE_MAX UINT32_MAX
83121
#endif
84122

123+
#define INT_FAST8_MIN INT8_MIN
124+
#define INT_FAST64_MIN INT64_MIN
125+
126+
#define INT_LEAST8_MIN INT8_MIN
127+
#define INT_LEAST16_MIN INT16_MIN
128+
#define INT_LEAST32_MIN INT32_MIN
129+
#define INT_LEAST64_MIN INT64_MIN
130+
131+
#define INT_FAST8_MAX INT8_MAX
132+
#define INT_FAST64_MAX INT64_MAX
133+
134+
#define INT_LEAST8_MAX INT8_MAX
135+
#define INT_LEAST16_MAX INT16_MAX
136+
#define INT_LEAST32_MAX INT32_MAX
137+
#define INT_LEAST64_MAX INT64_MAX
138+
139+
#define UINT_FAST8_MAX UINT8_MAX
140+
#define UINT_FAST64_MAX UINT64_MAX
141+
142+
#define UINT_LEAST8_MAX UINT8_MAX
143+
#define UINT_LEAST16_MAX UINT16_MAX
144+
#define UINT_LEAST32_MAX UINT32_MAX
145+
#define UINT_LEAST64_MAX UINT64_MAX
146+
147+
85148
/* clang-format on */
86149

87150
#ifdef __cplusplus
88151
}
89152
#endif
90153

91-
#endif
154+
#endif

0 commit comments

Comments
 (0)