From ae9b26683c0a18f81c985a4b6dfd0c4ea9d52709 Mon Sep 17 00:00:00 2001 From: Radkesvat <134321679+radkesvat@users.noreply.github.com> Date: Sat, 11 May 2024 19:48:46 +0000 Subject: [PATCH] remove threads.h include since not present in ubuntu 18 --- ww/eventloop/base/hchan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ww/eventloop/base/hchan.c b/ww/eventloop/base/hchan.c index e4abdd3e..c6dfb542 100644 --- a/ww/eventloop/base/hchan.c +++ b/ww/eventloop/base/hchan.c @@ -1,6 +1,5 @@ #include "hchan.h" #include "hmutex.h" -#include "threads.h" #define align2(n, w) \ ({ \ @@ -38,7 +37,7 @@ typedef _Atomic(unsigned char) atomic_uint8_t; #define THREAD_ID_INVALID SIZE_MAX static size_t thread_id() { - static thread_local size_t _thread_id = THREAD_ID_INVALID; + static _Thread_local size_t _thread_id = THREAD_ID_INVALID; static atomic_size _thread_id_counter = ATOMIC_VAR_INIT(0); size_t tid = _thread_id; if (tid == THREAD_ID_INVALID) { @@ -221,7 +220,7 @@ static void thr_init(Thr* t) { } inline static Thr* thr_current() { - static thread_local Thr _thr = {0}; + static _Thread_local Thr _thr = {0}; Thr* t = &_thr; if (!t->init) thr_init(t);