1#include "threads_impl.h"
2
3int pthread_mutexattr_settype(pthread_mutexattr_t* a, int type) {
4    if (type & ~PTHREAD_MUTEX_MASK)
5        return EINVAL;
6    a->__attr = (a->__attr & ~PTHREAD_MUTEX_MASK) | type;
7    return 0;
8}
9