diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-08-02 16:57:42 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-08-02 16:57:42 +0000 |
commit | 5d550e87dde9b5a3321c98513099d7da601319ef (patch) | |
tree | 2533cbd8626062bb158d72ceda221d35c76605a1 /nptl/allocatestack.c | |
parent | ebe3a574be44dc0d7724945e8cea53b92297593b (diff) |
Updated to fedora-glibc-20060802T1650cvs/fedora-glibc-2_4_90-16
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); |