Bugzilla bug 96198: added _PR_CleanupDtoa() to destroy the locks created

in prdtoa.c. The patch is contributed by Jeff Hostetler <jeff@NerdOne.com>.
Modified files: primpl.h prdtoa.c prinit.c ptthread.c
This commit is contained in:
wtc%netscape.com 2001-12-28 03:35:16 +00:00
parent 2be0d601ec
commit 3b6e395904
4 changed files with 13 additions and 0 deletions

View File

@ -1742,6 +1742,7 @@ extern void _PR_InitRWLocks(void);
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
extern void _PR_CleanupThread(PRThread *thread);
extern void _PR_CleanupCallOnce(void);
extern void _PR_CleanupDtoa(void);
extern void _PR_ShutdownLinker(void);
extern void _PR_CleanupEnv(void);
extern void _PR_CleanupIO(void);

View File

@ -1180,6 +1180,16 @@ void _PR_InitDtoa(void)
p5s_lock = PR_NewLock();
}
void _PR_CleanupDtoa(void)
{
PR_DestroyLock(freelist_lock);
freelist_lock = NULL;
PR_DestroyLock(p5s_lock);
p5s_lock = NULL;
/* FIXME: deal with freelist and p5s. */
}
#if defined(HAVE_WATCOM_BUG_1)
PRFloat64 __pascal __loadds __export
#else

View File

@ -417,6 +417,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
PR_ASSERT((_PR_IS_NATIVE_THREAD(me)) || (me->cpu->id == 0));
#endif
_PR_CleanupDtoa();
_PR_CleanupCallOnce();
_PR_ShutdownLinker();
/* Release the primordial thread's private data, etc. */

View File

@ -920,6 +920,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
PR_WaitCondVar(pt_book.cv, PR_INTERVAL_NO_TIMEOUT);
PR_Unlock(pt_book.ml);
_PR_CleanupDtoa();
_PR_CleanupCallOnce();
_PR_ShutdownLinker();
_PR_LogCleanup();