make pthread_create return EAGAIN on resource failure, as required by POSIX
This commit is contained in:
parent
1355fdca7c
commit
59666802fb
1 changed files with 1 additions and 1 deletions
|
|
@ -212,7 +212,7 @@ int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
a_dec(&libc.threads_minus_1);
|
a_dec(&libc.threads_minus_1);
|
||||||
munmap(map, size);
|
munmap(map, size);
|
||||||
return -ret;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
*res = new;
|
*res = new;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue