Bug 254983: implemented PR_DetachThread for Unix. r=nelsonb

git-svn-id: svn://10.0.0.236/trunk@218185 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtchang%redhat.com 2007-01-11 02:06:17 +00:00
parent 312daad921
commit 9b59ea464e

View File

@ -620,7 +620,17 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thred)
return (0 == rv) ? PR_SUCCESS : PR_FAILURE;
} /* PR_JoinThread */
PR_IMPLEMENT(void) PR_DetachThread(void) { } /* PR_DetachThread */
PR_IMPLEMENT(void) PR_DetachThread(void)
{
void *thred;
int rv;
_PT_PTHREAD_GETSPECIFIC(pt_book.key, thred);
if (NULL == thred) return;
_pt_thread_death(thred);
rv = pthread_setspecific(pt_book.key, NULL);
PR_ASSERT(0 == rv);
} /* PR_DetachThread */
PR_IMPLEMENT(PRThread*) PR_GetCurrentThread(void)
{