Files
c3c/lib/std/threads/os/thread_none.c3
Christoffer Lerno e299a4b630 - Change typedef and const enums to not convert from literals by default. (#2934)
- Add `@constinit` to allow old typedef behaviour.
2026-02-13 20:39:47 +01:00

27 lines
665 B
Plaintext

module std::thread::os @if (!env::POSIX && !env::WIN32);
typedef NativeMutex = int;
typedef NativeTimedMutex = int;
typedef NativeConditionVariable = int;
typedef NativeOnceFlag = int;
typedef NativeThread = int;
fn void NativeOnceFlag.call_once(&flag, OnceFn func)
{
if (*flag == (NativeOnceFlag)0)
{
*flag = (NativeOnceFlag)1;
func();
}
}
fn void? NativeMutex.init(&mtx, MutexType type) => NOT_IMPLEMENTED~;
fn bool NativeMutex.is_initialized(&self)
{
return false;
}
macro void NativeMutex.lock(&mutex) => NOT_IMPLEMENTED~!!;
macro bool NativeMutex.try_lock(&mutex) => NOT_IMPLEMENTED~!!;
macro void NativeMutex.unlock(&mutex) => NOT_IMPLEMENTED~!!;