mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Refactor protocols.
This commit is contained in:
committed by
Christoffer Lerno
parent
f3e3aa231d
commit
99cfaa1583
@@ -1,6 +1,6 @@
|
||||
module std::thread::os @if (!env::POSIX && !env::WIN32);
|
||||
|
||||
def NativeMutex = distinct int;
|
||||
def NativeConditionVariable = distinct int;
|
||||
def NativeOnceFlag = distinct int;
|
||||
def NativeThread = distinct int;
|
||||
distinct NativeMutex = int;
|
||||
distinct NativeConditionVariable = int;
|
||||
distinct NativeOnceFlag = int;
|
||||
distinct NativeThread = int;
|
||||
@@ -1,7 +1,7 @@
|
||||
module std::thread::os @if(env::WIN32);
|
||||
import std::os::win32;
|
||||
|
||||
def NativeThread = distinct inline Win32_HANDLE;
|
||||
distinct NativeThread = inline Win32_HANDLE;
|
||||
|
||||
struct NativeMutex
|
||||
{
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
module std::thread;
|
||||
import std::thread::os;
|
||||
|
||||
def MutexType = distinct int;
|
||||
distinct MutexType = int;
|
||||
|
||||
const MutexType MUTEX_PLAIN = 0;
|
||||
const MutexType MUTEX_TIMED = 1;
|
||||
const MutexType MUTEX_RECURSIVE = 2;
|
||||
|
||||
def Mutex = distinct NativeMutex;
|
||||
def TimedMutex = distinct inline Mutex;
|
||||
def RecursiveMutex = distinct inline Mutex;
|
||||
def TimedRecursiveMutex = distinct inline Mutex;
|
||||
def ConditionVariable = distinct NativeConditionVariable;
|
||||
def Thread = distinct NativeThread;
|
||||
def OnceFlag = distinct NativeOnceFlag;
|
||||
distinct Mutex = NativeMutex;
|
||||
distinct TimedMutex = inline Mutex;
|
||||
distinct RecursiveMutex = inline Mutex;
|
||||
distinct TimedRecursiveMutex = inline Mutex;
|
||||
distinct ConditionVariable = NativeConditionVariable;
|
||||
distinct Thread = NativeThread;
|
||||
distinct OnceFlag = NativeOnceFlag;
|
||||
def OnceFn = fn void();
|
||||
|
||||
def ThreadFn = fn int(void* arg);
|
||||
|
||||
Reference in New Issue
Block a user