aboutsummaryrefslogtreecommitdiff
path: root/nptl/allocatestack.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-05 12:46:12 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-05 12:46:12 -0400
commit3b142ce5728f6d683f3375fb33099ebf243f6681 (patch)
tree896f73d70426cd798e72bd786c0cb000d55b50ad /nptl/allocatestack.c
parent2f0ad8f3a470fa5e9aeb9c5a41984f96ae58d7ba (diff)
parent5f4318d102d604e2f80bc97927e2d80f76063639 (diff)
downloadglibc-3b142ce5728f6d683f3375fb33099ebf243f6681.tar
glibc-3b142ce5728f6d683f3375fb33099ebf243f6681.tar.gz
glibc-3b142ce5728f6d683f3375fb33099ebf243f6681.tar.bz2
glibc-3b142ce5728f6d683f3375fb33099ebf243f6681.zip
Merge branch 'master' of ssh://sourceware.org/git/glibc
Conflicts: ChangeLog
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r--nptl/allocatestack.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 9b8b0ceb40..23d2ce559c 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -999,7 +999,16 @@ setxid_mark_thread (struct xid_command *cmdp, struct pthread *t)
/* If the thread is exiting right now, ignore it. */
if ((ch & EXITING_BITMASK) != 0)
- return;
+ {
+ /* Release the futex if there is no other setxid in
+ progress. */
+ if ((ch & SETXID_BITMASK) == 0)
+ {
+ t->setxid_futex = 1;
+ lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
+ }
+ return;
+ }
}
while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
ch | SETXID_BITMASK, ch));