? mcs/class/corlib/library-deps.stamp
? mcs/class/corlib/uj
? mcs/class/corlib/Test/.gdb_history
? mcs/class/corlib/Test/System.Threading
? mcs/class/corlib/Test/library-deps.stamp
? mcs/class/corlib/Test/run_test
Index: mono/mono/metadata/threads.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/threads.c,v
retrieving revision 1.33
diff -u -3 -p -r1.33 threads.c
--- mono/mono/metadata/threads.c	3 Oct 2002 14:01:29 -0000	1.33
+++ mono/mono/metadata/threads.c	25 Oct 2002 18:24:48 -0000
@@ -311,10 +311,10 @@ void ves_icall_System_Threading_Thread_S
 	Sleep(ms);
 }
 
-MonoAppDomain *ves_icall_System_Threading_Thread_CurrentThreadDomain_internal(void) 
+gint32
+ves_icall_System_Threading_Thread_GetDomainID (void) 
 {
-	/* return the current app */
-	return mono_domain_get()->domain;
+	return mono_domain_get()->domain_id;
 }
 
 MonoThread *
Index: mono/mono/metadata/threads.h
===================================================================
RCS file: /cvs/public/mono/mono/metadata/threads.h,v
retrieving revision 1.18
diff -u -3 -p -r1.18 threads.h
--- mono/mono/metadata/threads.h	3 Sep 2002 16:41:29 -0000	1.18
+++ mono/mono/metadata/threads.h	25 Oct 2002 18:24:48 -0000
@@ -26,8 +26,8 @@ extern HANDLE ves_icall_System_Threading
 extern void ves_icall_System_Threading_Thread_Thread_free_internal(MonoThread *this, HANDLE thread);
 extern void ves_icall_System_Threading_Thread_Start_internal(MonoThread *this, HANDLE thread);
 extern void ves_icall_System_Threading_Thread_Sleep_internal(int ms);
-extern MonoAppDomain * ves_icall_System_Threading_Thread_CurrentThreadDomain_internal(void);
 extern gboolean ves_icall_System_Threading_Thread_Join_internal(MonoThread *this, int ms, HANDLE thread);
+extern gint32 ves_icall_System_Threading_Thread_GetDomainID (void);
 extern void ves_icall_System_Threading_Thread_SlotHash_store(MonoObject *data);
 extern MonoObject *ves_icall_System_Threading_Thread_SlotHash_lookup(void);
 extern gboolean ves_icall_System_Threading_Monitor_Monitor_try_enter(MonoObject *obj, int ms);
Index: mono/mono/metadata/icall.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/icall.c,v
retrieving revision 1.223
diff -u -3 -p -r1.223 icall.c
--- mono/mono/metadata/icall.c	24 Oct 2002 15:58:03 -0000	1.223
+++ mono/mono/metadata/icall.c	25 Oct 2002 18:25:06 -0000
@@ -2895,10 +2895,10 @@ static gconstpointer icall_map [] = {
 	"System.Threading.Thread::Start_internal", ves_icall_System_Threading_Thread_Start_internal,
 	"System.Threading.Thread::Sleep_internal", ves_icall_System_Threading_Thread_Sleep_internal,
 	"System.Threading.Thread::CurrentThread_internal", mono_thread_current,
-	"System.Threading.Thread::CurrentThreadDomain_internal", ves_icall_System_Threading_Thread_CurrentThreadDomain_internal,
 	"System.Threading.Thread::Join_internal", ves_icall_System_Threading_Thread_Join_internal,
 	"System.Threading.Thread::SlotHash_lookup", ves_icall_System_Threading_Thread_SlotHash_lookup,
 	"System.Threading.Thread::SlotHash_store", ves_icall_System_Threading_Thread_SlotHash_store,
+	"System.Threading.Thread::GetDomainID", ves_icall_System_Threading_Thread_GetDomainID,
 	"System.Threading.Monitor::Monitor_exit", ves_icall_System_Threading_Monitor_Monitor_exit,
 	"System.Threading.Monitor::Monitor_test_owner", ves_icall_System_Threading_Monitor_Monitor_test_owner,
 	"System.Threading.Monitor::Monitor_test_synchronised", ves_icall_System_Threading_Monitor_Monitor_test_synchronised,
Index: mono/mono/metadata/ChangeLog
===================================================================
RCS file: /cvs/public/mono/mono/metadata/ChangeLog,v
retrieving revision 1.650
diff -u -3 -p -r1.650 ChangeLog
--- mono/mono/metadata/ChangeLog	24 Oct 2002 15:58:03 -0000	1.650
+++ mono/mono/metadata/ChangeLog	25 Oct 2002 18:25:29 -0000
@@ -1,3 +1,11 @@
+2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
+
+	* appdomain.h domain.c: Added an ID to appdomains.
+	
+	* threads.c threads.h icall.c: Implement icall
+	Thread:GetDomainID(), and remove unused icall 
+	CurrentThreadDomain_internal.
+
 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
 	* icall.c: Don't recurse through the base types in GetConstructor.
Index: mono/mono/metadata/appdomain.h
===================================================================
RCS file: /cvs/public/mono/mono/metadata/appdomain.h,v
retrieving revision 1.27
diff -u -3 -p -r1.27 appdomain.h
--- mono/mono/metadata/appdomain.h	17 Oct 2002 19:23:00 -0000	1.27
+++ mono/mono/metadata/appdomain.h	25 Oct 2002 18:25:29 -0000
@@ -79,6 +79,8 @@ struct _MonoDomain {
 	/* hashtables for Reflection handles */
 	MonoGHashTable     *type_hash;
 	MonoGHashTable     *refobject_hash;
+	/* Needed by Thread:GetDomainID() */
+	gint32             domain_id;
 };
 
 /* This is a copy of System.AppDomain */
Index: mono/mono/metadata/domain.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/domain.c,v
retrieving revision 1.18
diff -u -3 -p -r1.18 domain.c
--- mono/mono/metadata/domain.c	1 Sep 2002 20:47:55 -0000	1.18
+++ mono/mono/metadata/domain.c	25 Oct 2002 18:25:31 -0000
@@ -22,6 +22,8 @@
 
 static guint32 appdomain_thread_id = 0;
 
+static gint32 appdomain_id_counter = 0;
+
 MonoDomain *mono_root_domain = NULL;
 
 static MonoJitInfoTable *
@@ -182,6 +184,7 @@ mono_domain_create (void)
 	domain->jit_code_hash = g_hash_table_new (NULL, NULL);
 	domain->ldstr_table = mono_g_hash_table_new ((GHashFunc)ldstr_hash, (GCompareFunc)ldstr_equal);
 	domain->jit_info_table = mono_jit_info_table_new ();
+	domain->domain_id = InterlockedIncrement (&appdomain_id_counter);
 
 	InitializeCriticalSection (&domain->lock);
 	return domain;
Index: mcs/class/corlib//System.Threading/ChangeLog
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Threading/ChangeLog,v
retrieving revision 1.29
diff -u -3 -p -r1.29 ChangeLog
--- mcs/class/corlib//System.Threading/ChangeLog	24 Oct 2002 10:34:05 -0000	1.29
+++ mcs/class/corlib//System.Threading/ChangeLog	25 Oct 2002 18:25:49 -0000
@@ -1,3 +1,7 @@
+2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
+
+	* Thread.cs: Implement GetDomain() and GetDomainID().
+
 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
 	* ThreadPool.cs: now the monitor thread is not sleeping and checking if
Index: mcs/class/corlib//System.Threading/Thread.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/System.Threading/Thread.cs,v
retrieving revision 1.15
diff -u -3 -p -r1.15 Thread.cs
--- mcs/class/corlib//System.Threading/Thread.cs	3 Sep 2002 16:43:19 -0000	1.15
+++ mcs/class/corlib//System.Threading/Thread.cs	25 Oct 2002 18:25:51 -0000
@@ -118,17 +118,12 @@ namespace System.Threading
 			return(slothash[slot]);
 		}
 
-		[MonoTODO]
 		public static AppDomain GetDomain() {
-			// FIXME
-			return(null);
+			return AppDomain.CurrentDomain;
 		}
 
-		[MonoTODO]
-		public static int GetDomainID() {
-			// FIXME
-			return(0);
-		}
+		[MethodImplAttribute(MethodImplOptions.InternalCall)]
+		public extern static int GetDomainID();
 
 		public static LocalDataStoreSlot GetNamedDataSlot(string name) {
 			LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name];
Index: mcs/class/corlib//Test/AllTests.cs
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/AllTests.cs,v
retrieving revision 1.15
diff -u -3 -p -r1.15 AllTests.cs
--- mcs/class/corlib//Test/AllTests.cs	24 Sep 2002 09:18:12 -0000	1.15
+++ mcs/class/corlib//Test/AllTests.cs	25 Oct 2002 18:25:52 -0000
@@ -28,6 +28,7 @@ namespace MonoTests {
                                 suite.AddTest(System.Security.Cryptography.AllTests.Suite);
                                 suite.AddTest(System.IO.AllTests.Suite);
                                 suite.AddTest(System.Text.AllTests.Suite);
+                                suite.AddTest(System.Threading.AllTests.Suite);
                                 suite.AddTest(System.Security.Permissions.AllTests.Suite);
                                 suite.AddTest(System.Resources.AllTests.Suite);
 				suite.AddTest(System.Runtime.Serialization.AllTests.Suite);
Index: mcs/class/corlib//Test/ChangeLog
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/ChangeLog,v
retrieving revision 1.53
diff -u -3 -p -r1.53 ChangeLog
--- mcs/class/corlib//Test/ChangeLog	19 Oct 2002 16:25:46 -0000	1.53
+++ mcs/class/corlib//Test/ChangeLog	25 Oct 2002 18:25:53 -0000
@@ -1,3 +1,7 @@
+2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
+
+	* corlib_linux_test.args AllTests.cs: Added System.Threading testcases.
+
 2002-10-19  Sebastien Pouliot  <spouliot@videotron.ca>
 
 	* corlib_test.build: Removed all excluded cryptographic test code as 
Index: mcs/class/corlib//Test/corlib_linux_test.args
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/corlib_linux_test.args,v
retrieving revision 1.7
diff -u -3 -p -r1.7 corlib_linux_test.args
--- mcs/class/corlib//Test/corlib_linux_test.args	5 Oct 2002 18:32:57 -0000	1.7
+++ mcs/class/corlib//Test/corlib_linux_test.args	25 Oct 2002 18:25:54 -0000
@@ -81,6 +81,8 @@ System.Security.Permissions/FileIOPermis
 System.Text/AllTests.cs
 System.Text/StringBuilderTest.cs
 System.Text/ASCIIEncodingTest.cs
+System.Threading/AllTests.cs
+System.Threading/ThreadTest.cs
 System.Runtime.CompilerServices/AllTests.cs
 System.Runtime.CompilerServices/RuntimeHelpersTest.cs
 System.Runtime.Serialization/AllTests.cs
Index: mcs/class/corlib//Test/run_test.sh
===================================================================
RCS file: /cvs/public/mcs/class/corlib/Test/run_test.sh,v
retrieving revision 1.1
diff -u -3 -p -r1.1 run_test.sh
--- mcs/class/corlib//Test/run_test.sh	27 Aug 2002 17:31:05 -0000	1.1
+++ mcs/class/corlib//Test/run_test.sh	25 Oct 2002 18:25:54 -0000
@@ -10,11 +10,11 @@ if [ $# -eq 0 ]; then
 fi
 
 topdir=../../..
-NUNITCONSOLE=${topdir}/nunit/src/NUnitConsole/NUnitConsole_mono.exe
-NUNIT_MONO_PATH=${topdir}/nunit/src/NUnitCore:.
+NUNITCONSOLE=${topdir}/class/lib/NUnitConsole_mono.exe
+NUNIT_MONO_PATH=${topdir}/class/lib/:.
 
 for i in $@; do
-	MONO_PATH=../../../nunit/src/NUnitCore:. \
+	MONO_PATH=../../../class/lib:. \
 		mono ${NUNITCONSOLE} MonoTests.${i},corlib_linux_test.dll
 done
 
