Namespaces
Variants
Views
Actions

mtx_trylock

From cppreference.com
< c‎ | thread
Revision as of 17:36, 9 July 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Defined in header <threads.h>
int mtx_trylock( mtx_t *mutex );
(since C11)

Tries to lock the mutex pointed to by mutex without blocking.

[edit] Parameters

mutex - pointer to the mutex to lock

[edit] Return value

thrd_success if successful, thrd_busy if the mutex has already been locked, thrd_error if an error occurrs.

[edit] See also

blocks until locks a mutex
(function) [edit]
blocks until locks a mutex or times out
(function) [edit]
unlocks a mutex
(function) [edit]