diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-08-01 06:40:11 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-08-01 06:40:11 +0000 |
commit | a1260d92a7e3c11e1db74ad7007332f87fc1b690 (patch) | |
tree | 0690bdd3500e1dcc2b72ad8cd35b2a69de74dc79 /nptl/allocatestack.c | |
parent | 13669f2c304545de194ec014255b5e3141615ac1 (diff) | |
download | glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.tar glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.tar.gz glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.tar.bz2 glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.zip |
* stdlib/test-canon.c (do_test): Close fd before unlinking file so
that directory is empty even on non-POSIX filesystems.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r-- | nptl/allocatestack.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index a3ed1a33d3..4a1cd18481 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -742,9 +742,7 @@ __reclaim_stacks (void) list_t *runp; list_for_each (runp, &stack_used) { - struct pthread *curp; - - curp = list_entry (runp, struct pthread, list); + struct pthread *curp = list_entry (runp, struct pthread, list); if (curp != self) { /* This marks the stack as free. */ @@ -758,6 +756,13 @@ __reclaim_stacks (void) } } + /* Reset the PIDs in any cached stacks. */ + list_for_each (runp, &stack_cache) + { + struct pthread *curp = list_entry (runp, struct pthread, list); + curp->pid = self->pid; + } + /* Add the stack of all running threads to the cache. */ list_splice (&stack_used, &stack_cache); |