зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
bb1bf04cc5
Коммит
d04c389511
|
@ -1735,6 +1735,7 @@ extern void _PR_InitMW(void);
|
||||||
extern void _PR_InitRWLocks(void);
|
extern void _PR_InitRWLocks(void);
|
||||||
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
|
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
|
||||||
extern void _PR_CleanupThread(PRThread *thread);
|
extern void _PR_CleanupThread(PRThread *thread);
|
||||||
|
extern void _PR_CleanupStacks(void);
|
||||||
extern void _PR_CleanupTPD(void);
|
extern void _PR_CleanupTPD(void);
|
||||||
extern void _PR_Cleanup(void);
|
extern void _PR_Cleanup(void);
|
||||||
extern void _PR_LogCleanup(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
|
* Ideally, for each _PR_InitXXX(), there should be a corresponding
|
||||||
* _PR_XXXCleanup() that we can call here.
|
* _PR_XXXCleanup() that we can call here.
|
||||||
*/
|
*/
|
||||||
|
_PR_CleanupStacks();
|
||||||
_PR_CleanupBeforeExit();
|
_PR_CleanupBeforeExit();
|
||||||
_pr_initialized = PR_FALSE;
|
_pr_initialized = PR_FALSE;
|
||||||
return PR_SUCCESS;
|
return PR_SUCCESS;
|
||||||
|
|
|
@ -58,6 +58,14 @@ void _PR_InitStacks(void)
|
||||||
_pr_stackLock = PR_NewLock();
|
_pr_stackLock = PR_NewLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _PR_CleanupStacks(void)
|
||||||
|
{
|
||||||
|
if (_pr_stackLock) {
|
||||||
|
PR_DestroyLock(_pr_stackLock);
|
||||||
|
_pr_stackLock = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Allocate a stack for a thread.
|
** Allocate a stack for a thread.
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче