1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#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; } #ifdef TEST int main(void) { return 0; } #endif