mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
add C11 mutex functions
This commit is contained in:
committed by
Rich Felker
parent
e16f70f452
commit
8b0472932c
10
src/thread/mtx_init.c
Normal file
10
src/thread/mtx_init.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "pthread_impl.h"
|
||||
#include <threads.h>
|
||||
|
||||
int mtx_init(mtx_t *m, int type)
|
||||
{
|
||||
*m = (mtx_t){
|
||||
._m_type = ((type&mtx_recursive) ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL),
|
||||
};
|
||||
return thrd_success;
|
||||
}
|
Reference in New Issue
Block a user