diff options
author | kaie%kuix.de <devnull@localhost> | 2008-01-31 18:45:15 +0000 |
---|---|---|
committer | kaie%kuix.de <devnull@localhost> | 2008-01-31 18:45:15 +0000 |
commit | 0778fe252f9cf4bf883ddfa0314919f7d2a0d6d2 (patch) | |
tree | 545c931e6c6ea8eb240a7015f9d7ea0e41e1be2b | |
parent | 2e1b82f47bd8ffb9c64234ee9fbeb9074c3dc984 (diff) | |
download | nspr-hg-0778fe252f9cf4bf883ddfa0314919f7d2a0d6d2.tar.gz |
Bug 414997, PR_NewThreadPrivateIndex contract is violated by PR_CreateThread impls
Patch contributed by Wan-Teh Chang
r=julien.pierre, r=me
-rw-r--r-- | pr/src/pthreads/ptthread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c index 2d4f6a91..1e3bef9b 100644 --- a/pr/src/pthreads/ptthread.c +++ b/pr/src/pthreads/ptthread.c @@ -257,6 +257,8 @@ static void *_pt_root(void *arg) */ if (PR_FALSE == detached) { + /* Call TPD destructors on this thread. */ + _PR_DestroyThreadPrivate(thred); rv = pthread_setspecific(pt_book.key, NULL); PR_ASSERT(0 == rv); } @@ -597,7 +599,7 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thred) rv = pthread_detach(&id); PR_ASSERT(0 == rv); #endif - _pt_thread_death(thred); + _pt_thread_death_internal(thred, PR_FALSE); } else { |