mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Added the std::core::log for logging.
This commit is contained in:
@@ -4,4 +4,24 @@ typedef NativeMutex = int;
|
||||
typedef NativeTimedMutex = int;
|
||||
typedef NativeConditionVariable = int;
|
||||
typedef NativeOnceFlag = int;
|
||||
typedef NativeThread = int;
|
||||
typedef NativeThread = int;
|
||||
|
||||
fn void NativeOnceFlag.call_once(&flag, OnceFn func)
|
||||
{
|
||||
if (*flag == 0)
|
||||
{
|
||||
*flag = 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?;
|
||||
@@ -15,6 +15,11 @@ struct NativeMutex
|
||||
}
|
||||
}
|
||||
|
||||
fn bool NativeMutex.is_initialized(&self)
|
||||
{
|
||||
return self.initialized;
|
||||
}
|
||||
|
||||
struct NativeTimedMutex
|
||||
{
|
||||
Win32_SRWLOCK srw_lock;
|
||||
|
||||
Reference in New Issue
Block a user