MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / pthread_cond_timedwait

Function pthread_cond_timedwait

include/hamlib/winpthreads.h:1307–1319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1305}
1306
1307static int pthread_cond_timedwait(pthread_cond_t *c, pthread_mutex_t *m, struct timespec *t)
1308{
1309 unsigned long long tm = _pthread_rel_time_in_ms(t);
1310
1311 pthread_testcancel();
1312
1313 if (!SleepConditionVariableCS(c, m, (DWORD)tm)) return ETIMEDOUT;
1314
1315 /* We can have a spurious wakeup after the timeout */
1316 if (!_pthread_rel_time_in_ms(t)) return ETIMEDOUT;
1317
1318 return 0;
1319}
1320
1321static int pthread_condattr_destroy(pthread_condattr_t *a)
1322{

Callers

nothing calls this directly

Calls 2

_pthread_rel_time_in_msFunction · 0.85
pthread_testcancelFunction · 0.85

Tested by

no test coverage detected