Namespaces
Variants
Views
Actions

mtx_trylock

From cppreference.com
< c‎ | thread
Revision as of 21:42, 31 May 2013 by P12bot (Talk | contribs)

Defined in header <threads.h>
int mtx_trylock( mtx_t *mutex );
(since C11)

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

Parameters

mutex - pointer to the mutex to lock

Return value

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

See also

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