mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-10 19:30:10 +00:00
Update.
2004-09-18 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (allocate_stack): Return EAGAIN instead of ENOMEM when out of memory.
This commit is contained in:
parent
f4380a09e3
commit
1ab1fa6fb7
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* allocatestack.c (allocate_stack): Return EAGAIN instead of
|
||||||
|
ENOMEM when out of memory.
|
||||||
|
|
||||||
2004-09-10 Roland McGrath <roland@redhat.com>
|
2004-09-10 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
[BZ #379]
|
[BZ #379]
|
||||||
|
@ -366,8 +366,11 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
|||||||
|
|
||||||
/* Allocate the DTV for this thread. */
|
/* Allocate the DTV for this thread. */
|
||||||
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
|
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
|
||||||
/* Something went wrong. */
|
{
|
||||||
return errno;
|
/* Something went wrong. */
|
||||||
|
assert (errno == ENOMEM);
|
||||||
|
return EAGAIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Prepare to modify global data. */
|
/* Prepare to modify global data. */
|
||||||
@ -498,12 +501,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
|
|||||||
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
|
if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL)
|
||||||
{
|
{
|
||||||
/* Something went wrong. */
|
/* Something went wrong. */
|
||||||
int err = errno;
|
assert (errno == ENOMEM);
|
||||||
|
|
||||||
/* Free the stack memory we just allocated. */
|
/* Free the stack memory we just allocated. */
|
||||||
(void) munmap (mem, size);
|
(void) munmap (mem, size);
|
||||||
|
|
||||||
return err;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user