diff options
Diffstat (limited to 'lib/libc/thread')
| -rw-r--r-- | lib/libc/thread/thrd_current.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/thread/thrd_current.c b/lib/libc/thread/thrd_current.c index 69a99723..b588cc27 100644 --- a/lib/libc/thread/thrd_current.c +++ b/lib/libc/thread/thrd_current.c @@ -1,8 +1,9 @@ -#include <__thread.h> // for __thread_self -#include <threads.h> // for thrd_current, thrd_t +#include <__thread.h> +#include <threads.h> + +thread_local struct __thread_self __thread_self; thrd_t thrd_current(void) { - static struct __thread_self self = { 0 }; - return &self; + return &__thread_self; } |
