diff options
Diffstat (limited to 'src/thread/pthread_mutex_init.c')
-rw-r--r-- | src/thread/pthread_mutex_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/thread/pthread_mutex_init.c b/src/thread/pthread_mutex_init.c new file mode 100644 index 0000000..acf45a7 --- /dev/null +++ b/src/thread/pthread_mutex_init.c @@ -0,0 +1,8 @@ +#include "pthread_impl.h" + +int pthread_mutex_init(pthread_mutex_t *restrict m, const pthread_mutexattr_t *restrict a) +{ + *m = (pthread_mutex_t){0}; + if (a) m->_m_type = a->__attr; + return 0; +} |