/* Set type attribute for mutex. 
See IEEE 1003.1  */
int pthread_mutexattr_settype(pthread_mutexattr_t *_attr, int type)
/* Set type attribute for mutex. 
See IEEE 1003.1  */
int pthread_mutexattr_settype(pthread_mutexattr_t *_attr, int type)
{
	struct pthread_mutexattr *attr = (struct pthread_mutexattr *)_attr;
	int retc = EINVAL;
	if ((type == PTHREAD_MUTEX_NORMAL) ||
	    (type == PTHREAD_MUTEX_RECURSIVE) ||
	    (type == PTHREAD_MUTEX_ERRORCHECK)) {
		attr->type = type;
		retc = 0;
	}
	return retc;
}