2023-02-15 09:54:58 +00:00
|
|
|
|
|
|
|
// Note(bumbread): this file is included into threads.h when compiled under
|
|
|
|
// windows.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef struct thrd_t {
|
|
|
|
void *handle;
|
|
|
|
} thrd_t;
|
|
|
|
|
|
|
|
typedef struct tss_t {
|
2023-02-18 14:58:56 +00:00
|
|
|
unsigned tls_index;
|
2023-02-15 09:54:58 +00:00
|
|
|
} tss_t;
|
|
|
|
|
2023-02-18 14:58:56 +00:00
|
|
|
typedef struct cnd_t {
|
|
|
|
int idk_yet;
|
|
|
|
} cnd_t;
|
|
|
|
|
2023-02-15 09:54:58 +00:00
|
|
|
typedef struct mtx_t {
|
|
|
|
int type;
|
|
|
|
// Done to handle recursive mutexes
|
|
|
|
unsigned long recursion;
|
|
|
|
unsigned long owner;
|
|
|
|
_Atomic(int) counter;
|
|
|
|
void* semaphore;
|
|
|
|
} mtx_t;
|