mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +00:00
set CLOCK_MONOTONIC on conditional variables
This commit is contained in:
committed by
Ryan Fleury
parent
4bbed83eab
commit
ec6f569181
@@ -485,7 +485,11 @@ internal CondVar
|
|||||||
cond_var_alloc(void)
|
cond_var_alloc(void)
|
||||||
{
|
{
|
||||||
LNX_Entity *entity = lnx_entity_alloc(LNX_EntityKind_ConditionVariable);
|
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)
|
if(init_result == -1)
|
||||||
{
|
{
|
||||||
lnx_entity_release(entity);
|
lnx_entity_release(entity);
|
||||||
|
|||||||
Reference in New Issue
Block a user