some of this code should be cleaned up, e.g. using macros for some of the bit flags, masks, etc. nonetheless, the code is believed to be working and correct at this point.
8 lines
170 B
C
8 lines
170 B
C
#include "pthread_impl.h"
|
|
|
|
int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a)
|
|
{
|
|
memset(m, 0, sizeof *m);
|
|
if (a) m->_m_type = *a & 7;
|
|
return 0;
|
|
}
|