diff options
Diffstat (limited to 'libc-top-half/musl/src/thread/mtx_init.c')
-rw-r--r-- | libc-top-half/musl/src/thread/mtx_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/thread/mtx_init.c b/libc-top-half/musl/src/thread/mtx_init.c new file mode 100644 index 0000000..4826f76 --- /dev/null +++ b/libc-top-half/musl/src/thread/mtx_init.c @@ -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; +} |