pthread: pthread_mutexattr_getprotocol default is PTHREAD_PRIO_NONE
see https://sortix.org/os-test/basic/pthread/pthread_mutexattr_setprotocol.c Change-Id: I2969be22ea6c3ed360f8e91bb54528f25d9bf34b Reviewed-on: https://review.haiku-os.org/c/haiku/+/11386 Reviewed-by: waddlesplash <[email protected]> (cherry picked from commit baed5fcddd33f266804b7e27520e06609beab624) Reviewed-on: https://review.haiku-os.org/c/haiku/+/11387
This commit is contained in:
committed by
waddlesplash
parent
0de032d683
commit
f90957116e
@@ -150,7 +150,7 @@ pthread_mutexattr_getprotocol(const pthread_mutexattr_t *_mutexAttr,
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
*_protocol = 0;
|
||||
*_protocol = PTHREAD_PRIO_NONE;
|
||||
// not implemented
|
||||
|
||||
return B_OK;
|
||||
@@ -165,6 +165,8 @@ pthread_mutexattr_setprotocol(pthread_mutexattr_t *_mutexAttr, int protocol)
|
||||
if (_mutexAttr == NULL || (attr = *_mutexAttr) == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if (protocol != PTHREAD_PRIO_NONE)
|
||||
return ENOTSUP;
|
||||
// not implemented
|
||||
return B_NOT_ALLOWED;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user