musl-tcc/src/thread/pthread_mutexattr_settype.c

9 lines
184 B
C
Raw Normal View History

2022-03-20 08:48:53 +00:00
#include "pthread_impl.h"
int pthread_mutexattr_settype(pthread_mutexattr_t *a, int type)
{
if ((unsigned)type > 2) return EINVAL;
a->__attr = (a->__attr & ~3) | type;
return 0;
}