Use pthread_mutex for global lock on Linux.
This commit is contained in:
parent
9065ed83b8
commit
87a83d6841
@ -165,11 +165,12 @@ bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: non-windows: if we need these on linux, flesh them out
|
static pthread_mutex_t gMutex;
|
||||||
void InitGlobalLock() { }
|
void InitGlobalLock() { pthread_mutex_init(&gMutex, NULL); }
|
||||||
void GetGlobalLock() { }
|
void GetGlobalLock() { pthread_mutex_lock(&gMutex); }
|
||||||
void ReleaseGlobalLock() { }
|
void ReleaseGlobalLock() { pthread_mutex_unlock(&gMutex); }
|
||||||
|
|
||||||
|
// TODO: non-windows: if we need these on linux, flesh them out
|
||||||
void* OS_CreateThread(TThreadEntrypoint /*entry*/)
|
void* OS_CreateThread(TThreadEntrypoint /*entry*/)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user