summary refs log tree commit diff
path: root/nptl/allocatestack.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-11-08 01:07:04 +0000
committerUlrich Drepper <drepper@redhat.com>2007-11-08 01:07:04 +0000
commitf6ed654cabb55cc809bde696ad8357498af39757 (patch)
tree699d12220dc547380f544f9d7cf3996e60459d93 /nptl/allocatestack.c
parentf2a8406a4f5974230d33995105160a8bacbce500 (diff)
downloadglibc-f6ed654cabb55cc809bde696ad8357498af39757.tar.gz
glibc-f6ed654cabb55cc809bde696ad8357498af39757.tar.xz
glibc-f6ed654cabb55cc809bde696ad8357498af39757.zip
* sysdeps/x86_64/memset.S: Add sfence after movnti.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r--nptl/allocatestack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index c894e96a28..f75599c668 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -462,7 +462,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 	      mem = ARCH_RETRY_MMAP (size);
 	      if (__builtin_expect (mem == MAP_FAILED, 0))
 #endif
-		return errno;
+		{
+		  if (errno == ENOMEM)
+		    errno = EAGAIN;
+
+		  return errno;
+		}
 	    }
 
 	  /* SIZE is guaranteed to be greater than zero.