Namespaces
Variants
Views
Actions

mtx_init

From cppreference.com
< c‎ | thread
Revision as of 14:23, 2 November 2012 by P12bot (Talk | contribs)

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

Creates a new mutex object with type. The object pointed to by mutex is set to an identifier of the newly created mutex.

type must have one of the following values:

Parameters

mutex - pointer to the mutex to initialize
type - the type of the mutex

Return value

thrd_success if successful, thrd_error otherwise.