c/thread/mtx init

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

must have one of the following values:


 * mtx_plain - a simple, non-recursive mutex is created.
 * mtx_timed - a non-recursive mutex, that supports timeout, is created.
 * - a recursive mutex is created.
 * - a recursive mutex, that supports timeout, is created.

Return value
thrd_success if successful, thrd_error otherwise.