Bugzilla bug 95659: added _PR_CleanupStacks(), which is called from
PR_Cleanup(). The patch is contributed by jeff@NerdOne.com. Modified files: primpl.h, prinit.c, prustack.c git-svn-id: svn://10.0.0.236/trunk@101987 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1735,6 +1735,7 @@ extern void _PR_InitMW(void);
|
||||
extern void _PR_InitRWLocks(void);
|
||||
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
|
||||
extern void _PR_CleanupThread(PRThread *thread);
|
||||
extern void _PR_CleanupStacks(void);
|
||||
extern void _PR_CleanupTPD(void);
|
||||
extern void _PR_Cleanup(void);
|
||||
extern void _PR_LogCleanup(void);
|
||||
|
||||
@@ -446,6 +446,7 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
|
||||
* Ideally, for each _PR_InitXXX(), there should be a corresponding
|
||||
* _PR_XXXCleanup() that we can call here.
|
||||
*/
|
||||
_PR_CleanupStacks();
|
||||
_PR_CleanupBeforeExit();
|
||||
_pr_initialized = PR_FALSE;
|
||||
return PR_SUCCESS;
|
||||
|
||||
@@ -58,6 +58,14 @@ void _PR_InitStacks(void)
|
||||
_pr_stackLock = PR_NewLock();
|
||||
}
|
||||
|
||||
void _PR_CleanupStacks(void)
|
||||
{
|
||||
if (_pr_stackLock) {
|
||||
PR_DestroyLock(_pr_stackLock);
|
||||
_pr_stackLock = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Allocate a stack for a thread.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user