diff options
author | wtc%netscape.com <devnull@localhost> | 1998-12-10 19:58:23 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1998-12-10 19:58:23 +0000 |
commit | c0d97534172d0c696029710a88f73c9efe75d9d8 (patch) | |
tree | 85a292e142103f0e8aa04fc28117257e8d867349 | |
parent | e117e88d0bce3b523f22f44c81a861c81edbbd4e (diff) | |
download | nspr-hg-c0d97534172d0c696029710a88f73c9efe75d9d8.tar.gz |
In PR_JoinThread, we need to call pthread_detach after pthread_join
under DCE threads because DCE threads' pthread_detach does not reclaim
the terminated thread's resources.
-rw-r--r-- | pr/src/pthreads/ptthread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c index e82e80c4..bafce771 100644 --- a/pr/src/pthreads/ptthread.c +++ b/pr/src/pthreads/ptthread.c @@ -478,6 +478,10 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thred) PR_ASSERT(rv == 0 && result == NULL); if (0 == rv) { +#ifdef _PR_DCETHREADS + rv = pthread_detach(&id); + PR_ASSERT(0 == rv); +#endif _pt_thread_death(thred); } else |