[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r16237 - in /fsf/trunk/libc/nptl: ChangeLog allocatestack.c
- To: commits@xxxxxxxxxx
- Subject: [Commits] r16237 - in /fsf/trunk/libc/nptl: ChangeLog allocatestack.c
- From: eglibc@xxxxxxxxxx
- Date: Fri, 16 Dec 2011 00:02:17 -0000
Author: eglibc
Date: Fri Dec 16 00:02:16 2011
New Revision: 16237
Log:
Import glibc-mainline for 2011-12-16
Modified:
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/allocatestack.c
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Dec 16 00:02:16 2011
@@ -1,3 +1,7 @@
+2011-12-14 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ * allocatestack.c (allocate_stack): Return errno on failure.
+
2011-12-14 Jeff Law <law@xxxxxxxxxx>
[BZ #5245]
Modified: fsf/trunk/libc/nptl/allocatestack.c
==============================================================================
--- fsf/trunk/libc/nptl/allocatestack.c (original)
+++ fsf/trunk/libc/nptl/allocatestack.c Fri Dec 16 00:02:16 2011
@@ -435,7 +435,7 @@
{
/* Something went wrong. */
assert (errno == ENOMEM);
- return EAGAIN;
+ return errno;
}
@@ -496,12 +496,7 @@
MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);
if (__builtin_expect (mem == MAP_FAILED, 0))
- {
- if (errno == ENOMEM)
- __set_errno (EAGAIN);
-
- return errno;
- }
+ return errno;
/* SIZE is guaranteed to be greater than zero.
So we can never get a null pointer back from mmap. */
@@ -581,7 +576,7 @@
/* Free the stack memory we just allocated. */
(void) munmap (mem, size);
- return EAGAIN;
+ return errno;
}
@@ -636,10 +631,7 @@
#endif
if (mprotect (guard, guardsize, PROT_NONE) != 0)
{
- int err;
mprot_error:
- err = errno == ENOMEM ? EAGAIN : errno;
-
lll_lock (stack_cache_lock, LLL_PRIVATE);
/* Remove the thread from the list. */
@@ -657,7 +649,7 @@
is nothing we could do. */
(void) munmap (mem, size);
- return err;
+ return errno;
}
pd->guardsize = guardsize;
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits