summaryrefslogtreecommitdiff
path: root/src/thread/pthread_mutex_init.c
blob: fb689271ce7affd0171368005ceebc03abcf6cff (plain) (blame)
1
2
3
4
5
6
7
8
#include "pthread_impl.h"

int pthread_mutex_init(pthread_mutex_t *restrict m, const pthread_mutexattr_t *restrict a)
{
	memset(m, 0, sizeof *m);
	if (a) m->_m_type = *a & 7;
	return 0;
}