Bug 198634: we need to implement PR_DetachThread on the platforms that

don't have a way to detach the foreign threads automatically when they
terminate (e.g., OS/2).  The patch is contributed by Michael Kaply
<mkaply@us.ibm.com>.
This commit is contained in:
wtc%netscape.com 2003-04-10 02:22:44 +00:00
Родитель 6e017314e4
Коммит c4164c36b2
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -1509,6 +1509,18 @@ PR_IMPLEMENT(PRThread*) PR_AttachThread(PRThreadType type,
PR_IMPLEMENT(void) PR_DetachThread(void)
{
/*
* On IRIX and Windows, foreign threads are detached when
* they terminate.
*/
#if !defined(IRIX) && !defined(WIN32)
PRThread *me;
if (_pr_initialized) {
me = _MD_GET_ATTACHED_THREAD();
if ((me != NULL) && (me->flags & _PR_ATTACHED))
_PRI_DetachThread();
}
#endif
}
void _PRI_DetachThread(void)