mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
pthread API should return error code in return value not in errno.
Reviewed by: deischen
This commit is contained in:
parent
5c6ebad8f6
commit
58effe49ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120436
@ -41,9 +41,9 @@ int
|
||||
_pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (attr == NULL || *attr == NULL) {
|
||||
errno = EINVAL;
|
||||
ret = -1;
|
||||
ret = EINVAL;
|
||||
} else {
|
||||
(*attr)->suspend = THR_CREATE_SUSPENDED;
|
||||
ret = 0;
|
||||
|
@ -41,9 +41,9 @@ int
|
||||
_pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (attr == NULL || *attr == NULL) {
|
||||
errno = EINVAL;
|
||||
ret = -1;
|
||||
ret = EINVAL;
|
||||
} else {
|
||||
(*attr)->suspend = THR_CREATE_SUSPENDED;
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user