From 1ab1fa6fb741caf552f2f1d79467d2455655d02b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 18 Sep 2004 21:21:36 +0000 Subject: Update. 2004-09-18 Ulrich Drepper * allocatestack.c (allocate_stack): Return EAGAIN instead of ENOMEM when out of memory. --- nptl/ChangeLog | 5 +++++ nptl/allocatestack.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 6cd9b0dbd8..db3aeba3f7 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2004-09-18 Ulrich Drepper + + * allocatestack.c (allocate_stack): Return EAGAIN instead of + ENOMEM when out of memory. + 2004-09-10 Roland McGrath [BZ #379] diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 6dd2621d99..cbdd781eeb 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; } -- cgit 1.4.1