Ver código fonte

2004-02-09 Zoltan Varga <[email protected]>

	* Thread.cs: Add fields added to unmanaged MonoThread here as well.
	Fixes random errors caused by memory corruption.

svn path=/trunk/mcs/; revision=22906
Zoltan Varga 22 anos atrás
pai
commit
b28795d5dc

+ 5 - 0
mcs/class/corlib/System.Threading/ChangeLog

@@ -1,3 +1,8 @@
+2004-02-09  Zoltan Varga  <[email protected]>
+
+	* Thread.cs: Add fields added to unmanaged MonoThread here as well.
+	Fixes random errors caused by memory corruption.
+
 2004-02-06  Zoltan Varga  <[email protected]>
 
 	* Thread.cs: Store the thread name in unmanaged memory, since the

+ 7 - 1
mcs/class/corlib/System.Threading/Thread.cs

@@ -18,12 +18,16 @@ namespace System.Threading
 {
 	public sealed class Thread
 	{
+		#region Sync with object.h
 		// stores a thread handle
 		private IntPtr system_thread_handle;
 		
 		private CultureInfo current_culture;
 		private CultureInfo current_ui_culture;
 		private bool threadpool_thread;
+		/* accessed only from unmanaged code */
+		private IntPtr name;
+		private int name_len; 
 		private ThreadState state = ThreadState.Unstarted;
 		private object abort_exc;
 		internal object abort_state;
@@ -38,7 +42,9 @@ namespace System.Threading
 		private IntPtr static_data;
 		private IntPtr jit_data;
 		private IntPtr lock_data;
-		
+		private IntPtr appdomain_refs;
+		#endregion
+
 		private ThreadStart threadstart;
 		private string thread_name=null;