File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 28
28
#define LIBC_INLINE_ASM __asm__ __volatile__
29
29
#define LIBC_UNUSED __attribute__ ((unused))
30
30
31
- #ifdef LIBC_TARGET_ARCH_IS_GPU
31
+ // Uses the platform specific specialization
32
+ #define LIBC_THREAD_MODE_PLATFORM 0
33
+
34
+ // Mutex guards nothing, used in single-threaded implementations
35
+ #define LIBC_THREAD_MODE_SINGLE 1
36
+
37
+ // Vendor provides implementation
38
+ #define LIBC_THREAD_MODE_EXTERNAL 2
39
+
40
+ #ifdef LIBC_THREAD_MODE == LIBC_THREAD_MODE_SINGLE
32
41
#define LIBC_THREAD_LOCAL
33
42
#else
34
43
#define LIBC_THREAD_LOCAL thread_local
Original file line number Diff line number Diff line change 12
12
#include " src/__support/macros/attributes.h"
13
13
#include " src/__support/macros/config.h"
14
14
15
- // Uses the platform specific specialization
16
- #define LIBC_THREAD_MODE_PLATFORM 0
17
-
18
- // Mutex guards nothing, used in single-threaded implementations
19
- #define LIBC_THREAD_MODE_SINGLE 1
20
-
21
- // Vendor provides implementation
22
- #define LIBC_THREAD_MODE_EXTERNAL 2
23
-
24
15
#if !defined(LIBC_THREAD_MODE)
25
16
#error LIBC_THREAD_MODE is undefined
26
17
#endif // LIBC_THREAD_MODE
You can’t perform that action at this time.
0 commit comments