diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-09-18 21:21:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-09-18 21:21:36 +0000 |
commit | 1ab1fa6fb741caf552f2f1d79467d2455655d02b (patch) | |
tree | a62c9832387f80954fc6096873675bd54d7f9327 /nptl/allocatestack.c | |
parent | f4380a09e37999af50152fd294205119e4f875eb (diff) | |
download | glibc-1ab1fa6fb741caf552f2f1d79467d2455655d02b.zip glibc-1ab1fa6fb741caf552f2f1d79467d2455655d02b.tar.gz glibc-1ab1fa6fb741caf552f2f1d79467d2455655d02b.tar.bz2 |
Update.
2004-09-18 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (allocate_stack): Return EAGAIN instead of
ENOMEM when out of memory.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r-- | nptl/allocatestack.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 6dd2621..cbdd781 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -366,8 +366,11 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, /* Allocate the DTV for this thread. */ 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. */ @@ -498,12 +501,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, if (_dl_allocate_tls (TLS_TPADJ (pd)) == NULL) { /* Something went wrong. */ - int err = errno; + assert (errno == ENOMEM); /* Free the stack memory we just allocated. */ (void) munmap (mem, size); - return err; + return EAGAIN; } |