Lines Matching refs:mtx
221 cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *abs_time)
224 assert(mtx != NULL);
227 if (SleepConditionVariableCS((PCONDITION_VARIABLE)cond, (PCRITICAL_SECTION)mtx, timeout))
234 cnd_wait(cnd_t *cond, mtx_t *mtx)
237 assert(mtx != NULL);
238 SleepConditionVariableCS((PCONDITION_VARIABLE)cond, (PCRITICAL_SECTION)mtx, INFINITE);
246 mtx_destroy(mtx_t *mtx)
248 assert(mtx);
249 DeleteCriticalSection((PCRITICAL_SECTION)mtx);
254 mtx_init(mtx_t *mtx, int type)
256 assert(mtx != NULL);
262 InitializeCriticalSection((PCRITICAL_SECTION)mtx);
268 mtx_lock(mtx_t *mtx)
270 assert(mtx != NULL);
271 EnterCriticalSection((PCRITICAL_SECTION)mtx);
277 mtx_timedlock(mtx_t *mtx, const struct timespec *ts)
279 assert(mtx != NULL);
281 while (mtx_trylock(mtx) != thrd_success) {
292 mtx_trylock(mtx_t *mtx)
294 assert(mtx != NULL);
295 return TryEnterCriticalSection((PCRITICAL_SECTION)mtx) ? thrd_success : thrd_busy;
300 mtx_unlock(mtx_t *mtx)
302 assert(mtx != NULL);
303 LeaveCriticalSection((PCRITICAL_SECTION)mtx);