Skip to content

Commit

Permalink
remove threads.h include since not present in ubuntu 18
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed May 11, 2024
1 parent c7cbc70 commit ae9b266
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ww/eventloop/base/hchan.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "hchan.h"
#include "hmutex.h"
#include "threads.h"

#define align2(n, w) \
({ \
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ae9b266

Please sign in to comment.