mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improved support for freestanding.
This commit is contained in:
committed by
Christoffer Lerno
parent
f37f779e5a
commit
a22ebbb0ef
6
lib/std/threads/os/thread_none.c3
Normal file
6
lib/std/threads/os/thread_none.c3
Normal file
@@ -0,0 +1,6 @@
|
||||
module std::thread;
|
||||
|
||||
define NativeMutex = distinct int;
|
||||
define NativeConditionVariable = distinct int;
|
||||
define NativeOnceFlag = distinct int;
|
||||
define NativeThread = distinct int;
|
||||
@@ -3,9 +3,15 @@ module std::thread;
|
||||
enum ThreadModel
|
||||
{
|
||||
WIN32,
|
||||
POSIX
|
||||
POSIX,
|
||||
NONE
|
||||
}
|
||||
|
||||
$if (env::COMPILER_LIBC_AVAILABLE):
|
||||
const ThreadModel THREAD_MODEL = env::OS_TYPE == OsType.WIN32 ? ThreadModel.WIN32 : ThreadModel.POSIX;
|
||||
$else:
|
||||
const ThreadModel THREAD_MODEL = NONE;
|
||||
$endif;
|
||||
|
||||
define MutexType = distinct int;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user