mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-15 13:29:41 -07:00
set CLOCK_MONOTONIC on conditional variables
This commit is contained in:
1 parent
4bbed83eab
commit
ec6f569181
1 file changed
+5
-1
@@ -485,7 +485,11 @@ internal CondVar
|
||||
cond_var_alloc(void)
|
||||
{
|
||||
LNX_Entity *entity = lnx_entity_alloc(LNX_EntityKind_ConditionVariable);
|
||||
int init_result = pthread_cond_init(&entity->cv.cond_handle, 0);
|
||||
pthread_condattr_t attr;
|
||||
pthread_condattr_init(&attr);
|
||||
pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
|
||||
int init_result = pthread_cond_init(&entity->cv.cond_handle, &attr);
|
||||
pthread_condattr_destroy(&attr);
|
||||
if(init_result == -1)
|
||||
{
|
||||
lnx_entity_release(entity);
|
||||
|
||||
Reference in new issue
Block a user