move cleanup functions that accesses the current thread BEFORE the thread is deleted

This commit is contained in:
wilfried 2003-05-16 18:32:37 +00:00
parent 86fa06c69a
commit 0c8ec568af

View File

@ -1,7 +1,20 @@
$OpenBSD: patch-nsprpub_pr_src_misc_prinit_c,v 1.2 2003/05/16 16:09:08 wilfried Exp $
--- nsprpub/pr/src/misc/prinit.c.orig Fri May 16 10:04:18 2003
+++ nsprpub/pr/src/misc/prinit.c Fri May 16 10:03:16 2003
@@ -441,6 +441,7 @@
$OpenBSD: patch-nsprpub_pr_src_misc_prinit_c,v 1.3 2003/05/16 18:32:37 wilfried Exp $
--- nsprpub/pr/src/misc/prinit.c.orig Mon Jan 20 13:13:09 2003
+++ nsprpub/pr/src/misc/prinit.c Fri May 16 12:27:10 2003
@@ -430,6 +430,12 @@
_PR_LogCleanup();
/*
+ * accesses the current thread
+ */
+ _PR_CleanupNet();
+ _PR_CleanupIO();
+
+ /*
* This part should look like the end of _PR_NativeRunThread
* and _PR_UserRunThread.
*/
@@ -441,6 +447,7 @@
PR_DELETE(me->stack);
PR_DELETE(me);
}
@ -9,3 +22,12 @@ $OpenBSD: patch-nsprpub_pr_src_misc_prinit_c,v 1.2 2003/05/16 16:09:08 wilfried
/*
* XXX: We are freeing the heap memory here so that Purify won't
@@ -449,8 +456,6 @@
* Ideally, for each _PR_InitXXX(), there should be a corresponding
* _PR_XXXCleanup() that we can call here.
*/
- _PR_CleanupNet();
- _PR_CleanupIO();
#ifdef WINNT
_PR_CleanupCPUs();
#endif