Author: dick
Date: 2006-07-20 08:37:11 -0400 (Thu, 20 Jul 2006)
New Revision: 62811
Modified:
trunk/mono/mono/io-layer/ChangeLog
trunk/mono/mono/io-layer/threads.c
Log:
2006-07-20 Dick Porter <[EMAIL PROTECTED]>
* threads.c (_wapi_thread_set_termination_details): Improve the
test for already-disposed thread handles, and hold the lock around
the mutex abandoning.
Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog 2006-07-20 12:35:49 UTC (rev 62810)
+++ trunk/mono/mono/io-layer/ChangeLog 2006-07-20 12:37:11 UTC (rev 62811)
@@ -1,3 +1,9 @@
+2006-07-20 Dick Porter <[EMAIL PROTECTED]>
+
+ * threads.c (_wapi_thread_set_termination_details): Improve the
+ test for already-disposed thread handles, and hold the lock around
+ the mutex abandoning.
+
2006-07-17 Dick Porter <[EMAIL PROTECTED]>
* processes.c (CreateProcess): Don't change directory unless a new
Modified: trunk/mono/mono/io-layer/threads.c
===================================================================
--- trunk/mono/mono/io-layer/threads.c 2006-07-20 12:35:49 UTC (rev 62810)
+++ trunk/mono/mono/io-layer/threads.c 2006-07-20 12:37:11 UTC (rev 62811)
@@ -116,7 +116,8 @@
gboolean ok;
int thr_ret;
- if (_wapi_handle_issignalled (handle)) {
+ if (_wapi_handle_issignalled (handle) ||
+ _wapi_handle_type (handle) == WAPI_HANDLE_UNUSED) {
/* We must have already deliberately finished with
* this thread, so don't do any more now
*/
@@ -127,11 +128,11 @@
g_message ("%s: Thread %p terminating", __func__, handle);
#endif
- _wapi_thread_abandon_mutexes (handle);
-
thr_ret = _wapi_handle_lock_shared_handles ();
g_assert (thr_ret == 0);
+ _wapi_thread_abandon_mutexes (handle);
+
ok = _wapi_lookup_handle (handle, WAPI_HANDLE_THREAD,
(gpointer *)&thread_handle);
if (ok == FALSE) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches