System.Threading class stubs.
authorDick Porter <dick@acm.org>
Thu, 13 Sep 2001 12:47:25 +0000 (12:47 -0000)
committerDick Porter <dick@acm.org>
Thu, 13 Sep 2001 12:47:25 +0000 (12:47 -0000)
svn path=/trunk/mcs/; revision=810

26 files changed:
mcs/class/corlib/System.Threading/ApartmentState.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/AutoResetEvent.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/IOCompletionCallback.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Interlocked.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/LockCookie.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ManualResetEvent.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Monitor.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Mutex.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/NativeOverlapped.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Overlapped.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ReaderWriterLock.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/SynchronizationLockException.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Thread.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ThreadAbortException.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ThreadInterruptedException.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ThreadPool.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ThreadStart.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/ThreadStateException.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Timeout.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/Timer.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/TimerCallback.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/WaitCallback.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/WaitHandle.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/WaitOrTimerCallback.cs [new file with mode: 0755]
mcs/class/corlib/System.Threading/common.src

diff --git a/mcs/class/corlib/System.Threading/ApartmentState.cs b/mcs/class/corlib/System.Threading/ApartmentState.cs
new file mode 100755 (executable)
index 0000000..ed366cd
--- /dev/null
@@ -0,0 +1,18 @@
+//
+// System.Threading.ApartmentState.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public enum ApartmentState {
+               MTA,
+               STA,
+               Unknown
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/AutoResetEvent.cs b/mcs/class/corlib/System.Threading/AutoResetEvent.cs
new file mode 100755 (executable)
index 0000000..7c5e1a8
--- /dev/null
@@ -0,0 +1,19 @@
+//
+// System.Threading.AutoResetEvent.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading 
+{
+       public sealed class AutoResetEvent : WaitHandle 
+       {
+               public AutoResetEvent(bool initialState) {
+                       // FIXME
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/IOCompletionCallback.cs b/mcs/class/corlib/System.Threading/IOCompletionCallback.cs
new file mode 100755 (executable)
index 0000000..d78657c
--- /dev/null
@@ -0,0 +1,16 @@
+//
+// System.Threading.IOCompletionCallback.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       // 'unsafe' wasn't in the spec, but the compiler insists because of
+       // the pointer.
+       public unsafe delegate void IOCompletionCallback(uint errorCode, uint numBytes, NativeOverlapped *pOVERLAP);
+}
diff --git a/mcs/class/corlib/System.Threading/Interlocked.cs b/mcs/class/corlib/System.Threading/Interlocked.cs
new file mode 100755 (executable)
index 0000000..f0c340a
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// System.Threading.Interlocked.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class Interlocked 
+       {
+               public static int CompareExchange(ref int location1, int value, int comparand) {
+                       // lock
+                       if(comparand==location1) {
+                               int ret;
+                               
+                               ret=location1;
+                               location1=value;
+                               return(ret);
+                       }
+                       return(location1);
+               }
+
+               public static object CompareExchange(ref object location1, object value, object comparand) {
+                       // lock
+                       if(comparand==location1) {
+                               object ret;
+                               
+                               ret=location1;
+                               location1=value;
+                               return(ret);
+                       }
+                       return(location1);
+               }
+
+               public static float CompareExchange(ref float location1, float value, float comparand) {
+                       // lock
+                       if(comparand==location1) {
+                               float ret;
+                               
+                               ret=location1;
+                               location1=value;
+                               return(ret);
+                       }
+                       return(location1);
+               }
+
+               public static int Decrement(ref int location) {
+                       // lock
+                       location--;
+                       return(location);
+               }
+
+               public static long Decrement(ref long location) {
+                       // lock
+                       location--;
+                       return(location);
+               }
+
+               public static int Exchange(ref int location1, int value) {
+                       // lock
+                       int ret;
+                       
+                       ret=location1;
+                       location1=value;
+                       return(ret);
+               }
+
+               public static object Exchange(ref object location1, object value) {
+                       // lock
+                       object ret;
+                       
+                       ret=location1;
+                       location1=value;
+                       return(ret);
+               }
+
+               public static float Exchange(ref float location1, float value) {
+                       // lock
+                       float ret;
+                       
+                       ret=location1;
+                       location1=value;
+                       return(ret);
+               }
+
+               public static int Increment(ref int location) {
+                       // lock
+                       location++;
+                       return(location);
+               }
+
+               public static long Increment(ref long location) {
+                       // lock
+                       location++;
+                       return(location);
+               }
+       }
+}
+
diff --git a/mcs/class/corlib/System.Threading/LockCookie.cs b/mcs/class/corlib/System.Threading/LockCookie.cs
new file mode 100755 (executable)
index 0000000..e7c89c4
--- /dev/null
@@ -0,0 +1,16 @@
+//
+// System.Threading.LockCookie.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public struct LockCookie
+               {
+               }
+}
diff --git a/mcs/class/corlib/System.Threading/ManualResetEvent.cs b/mcs/class/corlib/System.Threading/ManualResetEvent.cs
new file mode 100755 (executable)
index 0000000..e8581e7
--- /dev/null
@@ -0,0 +1,16 @@
+//
+// System.Threading.ManualResetEvent.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+namespace System.Threading
+{
+       public sealed class ManualResetEvent : WaitHandle
+       {
+               // FIXME
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/Monitor.cs b/mcs/class/corlib/System.Threading/Monitor.cs
new file mode 100755 (executable)
index 0000000..a1a1129
--- /dev/null
@@ -0,0 +1,140 @@
+//
+// System.Threading.Monitor.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class Monitor
+       {
+               public static void Enter(object obj) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       if(obj.GetType().IsValueType==true) {
+                               throw new ArgumentException("Value type");
+                       }
+                       // FIXME
+               }
+
+               public static void Exit(object obj) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       if(obj.GetType().IsValueType==true) {
+                               throw new ArgumentException("Value type");
+                       }
+                       // FIXME
+               }
+
+               public static void Pulse(object obj) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // FIXME
+               }
+
+               public static void PulseAll(object obj) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // FIXME
+               }
+
+               public static bool TryEnter(object obj) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       if(obj.GetType().IsValueType==true) {
+                               throw new ArgumentException("Value type");
+                       }
+                       
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool TryEnter(object obj, int millisecondsTimeout) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       if(obj.GetType().IsValueType==true) {
+                               throw new ArgumentException("Value type");
+                       }
+                       if(millisecondsTimeout<0) {
+                               throw new ArgumentException("millisecondsTimeout negative");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool TryEnter(object obj, TimeSpan timeout) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       if(obj.GetType().IsValueType==true) {
+                               throw new ArgumentException("Value type");
+                       }
+                       if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("timeout out of range");
+                       }
+                       
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool Wait(object obj) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool Wait(object obj, int millisecondsTimeout) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool Wait(object obj, TimeSpan timeout) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // LAMESPEC: says to throw ArgumentException too
+                       if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("timeout out of range");
+                       }
+                       
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool Wait(object obj, int millisecondsTimeout, bool exitContext) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool Wait(object obj, TimeSpan timeout, bool exitContext) {
+                       if(obj==null) {
+                               throw new ArgumentNullException("obj");
+                       }
+                       // LAMESPEC: says to throw ArgumentException too
+                       if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("timeout out of range");
+                       }
+                       
+                       // FIXME
+                       return(false);
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/Mutex.cs b/mcs/class/corlib/System.Threading/Mutex.cs
new file mode 100755 (executable)
index 0000000..1f66d55
--- /dev/null
@@ -0,0 +1,32 @@
+//
+// System.Threading.Mutex.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class Mutex : WaitHandle 
+       {
+               public Mutex() {
+                       // FIXME
+               }
+
+               public Mutex(bool initiallyOwned) {
+                       // FIXME
+               }
+
+               public Mutex(bool initiallyOwned, string name) {
+                       // FIXME
+               }
+
+               public Mutex(bool initiallyOwned, string name, out bool gotOwnership) {
+                       // FIXME
+                       gotOwnership=false;
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/NativeOverlapped.cs b/mcs/class/corlib/System.Threading/NativeOverlapped.cs
new file mode 100755 (executable)
index 0000000..3f2e41e
--- /dev/null
@@ -0,0 +1,24 @@
+//
+// System.Threading.NativeOverlapped.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+using System.Runtime.InteropServices;
+
+namespace System.Threading
+{
+       public struct NativeOverlapped {
+               public int EventHandle;
+               public int InternalHigh;
+               public int InternalLow;
+               public int OffsetHigh;
+               public int OffsetLow;
+               public GCHandle ReservedClassLib;
+               public int ReservedCOR1;
+               public GCHandle ReservedCOR2;
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/Overlapped.cs b/mcs/class/corlib/System.Threading/Overlapped.cs
new file mode 100755 (executable)
index 0000000..d9963ca
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// System.Threading.Overlapped.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public class Overlapped
+       {
+               unsafe public static void Free(NativeOverlapped *nativeOverlappedPtr) {
+                       // FIXME
+               }
+
+               unsafe public static Overlapped Unpack(NativeOverlapped *nativeOverlappedPtr) {
+                       // FIXME
+                       return(new Overlapped());
+               }
+
+               public Overlapped() {
+                       // FIXME
+               }
+
+               public Overlapped(int offsetLo, int offsetHi, int hEvent, IAsyncResult ar) {
+                       // FIXME
+               }
+
+               public IAsyncResult AsyncResult {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public int EventHandle {
+                       get {
+                               // FIXME
+                               return(0);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public int OffsetHigh {
+                       get {
+                               // FIXME
+                               return(0);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public int OffsetLow {
+                       get {
+                               // FIXME
+                               return(0);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               unsafe public NativeOverlapped *Pack(IOCompletionCallback iocb) {
+                       // FIXME
+                       return(null);
+               }
+               
+               unsafe public NativeOverlapped *UnsafePack(IOCompletionCallback iocb) {
+                       // FIXME
+                       return(null);
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/ReaderWriterLock.cs b/mcs/class/corlib/System.Threading/ReaderWriterLock.cs
new file mode 100755 (executable)
index 0000000..984d6d6
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// System.Threading.ReaderWriterLock.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class ReaderWriterLock
+       {
+               public ReaderWriterLock() {
+                       // FIXME
+               }
+
+               public bool IsReaderLockHeld {
+                       get {
+                               // FIXME
+                               return(false);
+                       }
+               }
+
+               public bool IsWriterLockHeld {
+                       get {
+                               // FIXME
+                               return(false);
+                       }
+               }
+
+               public int WriterSeqNum {
+                       get {
+                               // FIXME
+                               return(0);
+                       }
+               }
+
+               public void AcquireReaderLock(int millisecondsTimeout) {
+                       // FIXME
+               }
+
+               public void AcquireReaderLock(TimeSpan timeout) {
+                       // FIXME
+               }
+
+               public void AcquireWriterLock(int millisecondsTimeout) {
+                       // FIXME
+               }
+
+               public void AcquireWriterLock(TimeSpan timeout) {
+                       // FIXME
+               }
+
+               public bool AnyWritersSince(int seqNum) {
+                       // FIXME
+                       return(false);
+               }
+
+               public void DowngradeFromWriterLock(ref LockCookie lockCookie) {
+                       // FIXME
+               }
+
+               public LockCookie ReleaseLock() {
+                       // FIXME
+                       return(new LockCookie());
+               }
+
+               public void ReleaseReaderLock() {
+                       // FIXME
+               }
+
+               public void ReleaseWriterLock() {
+                       // FIXME
+               }
+
+               public void RestoreLock(ref LockCookie lockCookie) {
+                       // FIXME
+               }
+
+               public LockCookie UpgradeToWriterLock(int millisecondsTimeout) {
+                       // FIXME
+                       return(new LockCookie());
+               }
+
+               public LockCookie UpgradeToWriterLock(TimeSpan timeout) {
+                       // FIXME
+                       return(new LockCookie());
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs b/mcs/class/corlib/System.Threading/RegisteredWaitHandle.cs
new file mode 100755 (executable)
index 0000000..36e8a78
--- /dev/null
@@ -0,0 +1,24 @@
+//
+// System.Threading.RegisteredWaitHandle.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class RegisteredWaitHandle
+       {
+               public bool Unregister(WaitHandle waitObject) {
+                       // FIXME
+                       return(false);
+               }
+
+               ~RegisteredWaitHandle() {
+                       // FIXME
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/SynchronizationLockException.cs b/mcs/class/corlib/System.Threading/SynchronizationLockException.cs
new file mode 100755 (executable)
index 0000000..ec73e9f
--- /dev/null
@@ -0,0 +1,32 @@
+//
+// System.Threading.SynchronizationLockException.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+using System.Runtime.Serialization;
+
+namespace System.Threading
+{
+       public class SynchronizationLockException : SystemException
+       {
+               public SynchronizationLockException()
+                       : base ("Synchronization Error") {
+               }
+
+               public SynchronizationLockException(string message)
+                       : base (message) {
+               }
+
+               protected SynchronizationLockException(SerializationInfo info, StreamingContext context)
+                       : base (info, context) {
+               }
+
+               public SynchronizationLockException(string message, Exception innerException)
+                       : base (message, innerException) {
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
new file mode 100755 (executable)
index 0000000..fb72ec7
--- /dev/null
@@ -0,0 +1,229 @@
+//
+// System.Threading.Thread.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+using System.Runtime.Remoting.Contexts;
+using System.Security.Principal;
+using System.Globalization;
+
+namespace System.Threading
+{
+       public sealed class Thread
+       {
+               public static Context CurrentContext {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+               }
+
+               public static IPrincipal CurrentPrincipal {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public static Thread CurrentThread {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+               }
+
+               public static LocalDataStoreSlot AllocateDataSlot() {
+                       // FIXME
+                       return(null);
+               }
+
+               public static LocalDataStoreSlot AllocateNamedDataSlot(string name) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static void FreeNamedDataSlot(string name) {
+                       // FIXME
+               }
+
+               public static object GetData(LocalDataStoreSlot slot) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static AppDomain GetDomain() {
+                       // FIXME
+                       return(null);
+               }
+
+               public static int GetDomainID() {
+                       // FIXME
+                       return(0);
+               }
+
+               public static LocalDataStoreSlot GetNamedDataSlot(string name) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static void ResetAbort() {
+                       // FIXME
+               }
+
+               public static void SetData(LocalDataStoreSlot slot, object data) {
+                       // FIXME
+               }
+
+               public static void Sleep(int millisecondsTimeout) {
+                       if(millisecondsTimeout<0) {
+                               throw new ArgumentException("Negative timeout");
+                       }
+                       // FIXME
+               }
+
+               public static void Sleep(TimeSpan timeout) {
+                       // LAMESPEC: says to throw ArgumentException too
+                       if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("Timeout out of range");
+                       }
+                       // FIXME
+               }
+
+               public Thread(ThreadStart start) {
+                       if(start==null) {
+                               throw new ArgumentNullException("Null ThreadStart");
+                       }
+                       // FIXME
+               }
+
+               public ApartmentState ApartmentState {
+                       get {
+                               // FIXME
+                               return(ApartmentState.Unknown);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public CultureInfo CurrentCulture {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public CultureInfo CurrentUICulture {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public bool IsAlive {
+                       get {
+                               // FIXME
+                               return(false);
+                       }
+               }
+
+               public bool IsBackground {
+                       get {
+                               // FIXME
+                               return(false);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public string Name {
+                       get {
+                               // FIXME
+                               return("none");
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public ThreadPriority Priority {
+                       get {
+                               // FIXME
+                               return(ThreadPriority.Lowest);
+                       }
+                       
+                       set {
+                       }
+               }
+
+               public ThreadState ThreadState {
+                       get {
+                               // FIXME
+                               return(ThreadState.Unstarted);
+                       }
+               }
+
+               public void Abort() {
+                       // FIXME
+               }
+
+               public void Abort(object stateInfo) {
+                       // FIXME
+               }
+
+               public void Interrupt() {
+                       // FIXME
+               }
+
+               public void Join() {
+                       // FIXME
+               }
+
+               public bool Join(int millisecondsTimeout) {
+                       if(millisecondsTimeout<0) {
+                               throw new ArgumentException("Timeout less than zero");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public bool Join(TimeSpan timeout) {
+                       // LAMESPEC: says to throw ArgumentException too
+                       if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("timeout out of range");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public void Resume() {
+                       // FIXME
+               }
+
+               public void Start() {
+                       // FIXME
+               }
+
+               public void Suspend() {
+                       // FIXME
+               }
+
+               ~Thread() {
+                       // FIXME
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/ThreadAbortException.cs b/mcs/class/corlib/System.Threading/ThreadAbortException.cs
new file mode 100755 (executable)
index 0000000..6d6c831
--- /dev/null
@@ -0,0 +1,22 @@
+//
+// System.Threading.ThreadAbortException.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class ThreadAbortException : SystemException
+       {
+               public object ExceptionState {
+                       get {
+                               // FIXME
+                               return(null);
+                       }
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/ThreadInterruptedException.cs b/mcs/class/corlib/System.Threading/ThreadInterruptedException.cs
new file mode 100755 (executable)
index 0000000..133e523
--- /dev/null
@@ -0,0 +1,32 @@
+//
+// System.Threading.ThreadInterruptedException.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+using System.Runtime.Serialization;
+
+namespace System.Threading
+{
+       public class ThreadInterruptedException : SystemException
+       {
+               public ThreadInterruptedException()
+                       : base ("Thread interrupted") {
+               }
+
+               public ThreadInterruptedException(string message)
+                       : base (message) {
+               }
+
+               protected ThreadInterruptedException(SerializationInfo info, StreamingContext context)
+                       : base (info, context) {
+               }
+
+               public ThreadInterruptedException(string message, Exception innerException)
+                       : base (message, innerException) {
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/ThreadPool.cs b/mcs/class/corlib/System.Threading/ThreadPool.cs
new file mode 100755 (executable)
index 0000000..31b99d2
--- /dev/null
@@ -0,0 +1,88 @@
+//
+// System.Threading.ThreadPool.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class ThreadPool
+       {
+               public static bool BindHandle(IntPtr osHandle) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool QueueUserWorkItem(WaitCallback callback) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool QueueUserWorkItem(WaitCallback callback, object state) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce) {
+                       if(millisecondsTimeOutInterval < -1) {
+                               throw new ArgumentOutOfRangeException("timeout < -1");
+                       }
+                       // FIXME
+                       return(null);
+               }
+
+               public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, long millisecondsTimeOutInterval, bool executeOnlyOnce) {
+                       if(millisecondsTimeOutInterval < -1) {
+                               throw new ArgumentOutOfRangeException("timeout < -1");
+                       }
+                       // FIXME
+                       return(null);
+               }
+
+               public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, TimeSpan timeout, bool executeOnlyOnce) {
+                       // LAMESPEC: I assume it means "timeout" when it says "millisecondsTimeOutInterval"
+                       if(timeout.Milliseconds < -1) {
+                               throw new ArgumentOutOfRangeException("timeout < -1");
+                       }
+                       if(timeout.Milliseconds > Int32.MaxValue) {
+                               throw new NotSupportedException("timeout too large");
+                       }
+                       // FIXME
+                       return(null);
+               }
+
+               public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static bool UnsafeQueueUserWorkItem(WaitCallback callback, object state) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, long millisecondsTimeOutInterval, bool executeOnlyOnce) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, TimeSpan timeout, bool executeOnlyOnce) {
+                       // FIXME
+                       return(null);
+               }
+
+               public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) {
+                       // FIXME
+                       return(null);
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/ThreadStart.cs b/mcs/class/corlib/System.Threading/ThreadStart.cs
new file mode 100755 (executable)
index 0000000..ebd6bc9
--- /dev/null
@@ -0,0 +1,14 @@
+//
+// System.Threading.ThreadStart.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public delegate void ThreadStart();
+}
diff --git a/mcs/class/corlib/System.Threading/ThreadStateException.cs b/mcs/class/corlib/System.Threading/ThreadStateException.cs
new file mode 100755 (executable)
index 0000000..c1a09f3
--- /dev/null
@@ -0,0 +1,32 @@
+//
+// System.Threading.ThreadStateException.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+using System.Runtime.Serialization;
+
+namespace System.Threading
+{
+       public class ThreadStateException : SystemException
+       {
+               public ThreadStateException()
+                       : base ("Thread State Error") {
+               }
+
+               public ThreadStateException(string message)
+                       : base (message) {
+               }
+
+               protected ThreadStateException(SerializationInfo info, StreamingContext context)
+                       : base (info, context) {
+               }
+
+               public ThreadStateException(string message, Exception innerException)
+                       : base (message, innerException) {
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/Timeout.cs b/mcs/class/corlib/System.Threading/Timeout.cs
new file mode 100755 (executable)
index 0000000..83da26f
--- /dev/null
@@ -0,0 +1,17 @@
+//
+// System.Threading.Timeout.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class Timeout
+       {
+               public const int Infinite=-1;
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs
new file mode 100755 (executable)
index 0000000..6c056bf
--- /dev/null
@@ -0,0 +1,101 @@
+//
+// System.Threading.Timer.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public sealed class Timer : IDisposable
+       {
+               public Timer(TimerCallback callback, object state, int dueTime, int period) {
+                       if(dueTime < -1) {
+                               throw new ArgumentOutOfRangeException("Due time < -1");
+                       }
+                       if(period < -1) {
+                               throw new ArgumentOutOfRangeException("Period < -1");
+                       }
+                       
+                       // FIXME
+               }
+
+               public Timer(TimerCallback callback, object state, long dueTime, long period) {
+                       if(dueTime < -1) {
+                               throw new ArgumentOutOfRangeException("Due time < -1");
+                       }
+                       if(period < -1) {
+                               throw new ArgumentOutOfRangeException("Period < -1");
+                       }
+                       // FIXME
+               }
+
+               public Timer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period) {
+                       if(dueTime.Milliseconds < 0 || dueTime.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("Due time out of range");
+                       }
+                       if(period.Milliseconds < 0 || period.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("Period out of range");
+                       }
+                       // FIXME
+               }
+
+               public Timer(TimerCallback callback, object state, uint dueTime, uint period) {
+                       // FIXME
+               }
+
+               public bool Change(int dueTime, int period) {
+                       if(dueTime < -1) {
+                               throw new ArgumentOutOfRangeException("Due time < -1");
+                       }
+                       if(period < -1) {
+                               throw new ArgumentOutOfRangeException("Period < -1");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public bool Change(long dueTime, long period) {
+                       if(dueTime < -1) {
+                               throw new ArgumentOutOfRangeException("Due time < -1");
+                       }
+                       if(period < -1) {
+                               throw new ArgumentOutOfRangeException("Period < -1");
+                       }
+                       if(dueTime > 4294967294) {
+                               throw new NotSupportedException("Due time too large");
+                       }
+                       if(period > 4294967294) {
+                               throw new NotSupportedException("Period too large");
+                       }
+                       // FIXME
+                       return(false);
+               }
+
+               public bool Change(TimeSpan dueTime, TimeSpan period) {
+                       // FIXME
+                       return(false);
+               }
+
+               public bool Change(uint dueTime, uint period) {
+                       // FIXME
+                       return(false);
+               }
+
+               public void Dispose() {
+                       // FIXME
+               }
+
+               public bool Dispose(WaitHandle notifyObject) {
+                       // FIXME
+                       return(false);
+               }
+
+               ~Timer() {
+                       // FIXME
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/TimerCallback.cs b/mcs/class/corlib/System.Threading/TimerCallback.cs
new file mode 100755 (executable)
index 0000000..3afe1fc
--- /dev/null
@@ -0,0 +1,14 @@
+//
+// System.Threading.TimerCallback.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public delegate void TimerCallback(object state);
+}
diff --git a/mcs/class/corlib/System.Threading/WaitCallback.cs b/mcs/class/corlib/System.Threading/WaitCallback.cs
new file mode 100755 (executable)
index 0000000..ed1e39c
--- /dev/null
@@ -0,0 +1,14 @@
+//
+// System.Threading.WaitCallback.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public delegate void WaitCallback(object state);
+}
diff --git a/mcs/class/corlib/System.Threading/WaitHandle.cs b/mcs/class/corlib/System.Threading/WaitHandle.cs
new file mode 100755 (executable)
index 0000000..3eca67b
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// System.Threading.WaitHandle.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public abstract class WaitHandle : MarshalByRefObject, IDisposable
+       {
+               public static bool WaitAll(WaitHandle[] waitHandles) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static bool WaitAll(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) {
+                       // FIXME
+                       return(false);
+               }
+
+               public static int WaitAny(WaitHandle[] waitHandles) {
+                       // FIXME
+                       return(0);
+               }
+
+               public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) {
+                       // FIXME
+                       return(0);
+               }
+
+               public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) {
+                       if(timeout.Milliseconds < 0 || timeout.Milliseconds > Int32.MaxValue) {
+                               throw new ArgumentOutOfRangeException("Timeout out of range");
+                       }
+                       // FIXME
+                       return(0);
+               }
+
+               public WaitHandle() {
+                       // FIXME
+               }
+
+               public virtual IntPtr Handle {
+                       get {
+                               // FIXME
+                               return new IntPtr();
+                       }
+                               
+                       set {
+                               // FIXME
+                       }
+               }
+
+               public virtual void Close() {
+                       // FIXME
+               }
+
+               protected static readonly IntPtr InvalidHandle;
+
+               private bool disposed = false;
+
+               public void Dispose() {
+                       Dispose(true);
+                       // Take yourself off the Finalization queue
+                       GC.SuppressFinalize(this);
+               }
+               
+               protected virtual void Dispose(bool explicitDisposing) {
+                       // Check to see if Dispose has already been called.
+                       if(!this.disposed) {
+                               // If this is a call to Dispose,
+                               // dispose all managed resources.
+                               if(explicitDisposing) {
+                                       // Free up stuff here
+                                       //Components.Dispose();
+                               }
+
+                               // Release unmanaged resources
+                               // Note that this is not thread safe.
+                               // Another thread could start
+                               // disposing the object after the
+                               // managed resources are disposed, but
+                               // before the disposed flag is set to
+                               // true.
+                               this.disposed=true;
+                               //Release(handle);
+                               //handle=IntPtr.Zero;
+                       }
+               }
+
+               ~WaitHandle() {
+                       Dispose(false);
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Threading/WaitOrTimerCallback.cs b/mcs/class/corlib/System.Threading/WaitOrTimerCallback.cs
new file mode 100755 (executable)
index 0000000..03a03d7
--- /dev/null
@@ -0,0 +1,14 @@
+//
+// System.Threading.WaitOrTimerCallback.cs
+//
+// Author:
+//   Dick Porter (dick@ximian.com)
+//
+// (C) Ximian, Inc.  http://www.ximian.com
+//
+
+
+namespace System.Threading
+{
+       public delegate void WaitOrTimerCallback(object state, bool timedOut);
+}
index feba1d5271b9a614555051e60fb5a5b27aab6d75..2d8ef100aa8ce6fe2d5caf5f3bb38a08c0846755 100644 (file)
@@ -1,2 +1,27 @@
+ApartmentState.cs
+AutoResetEvent.cs
+IOCompletionCallback.cs
+Interlocked.cs
+LockCookie.cs
+ManualResetEvent.cs
+Monitor.cs
+Mutex.cs
+NativeOverlapped.cs
+Overlapped.cs
+ReaderWriterLock.cs
+RegisteredWaitHandle.cs
+SynchronizationLockException.cs
+Thread.cs
+ThreadAbortException.cs
+ThreadInterruptedException.cs
+ThreadPool.cs
 ThreadPriority.cs
+ThreadStart.cs
 ThreadState.cs
+ThreadStateException.cs
+Timeout.cs
+Timer.cs
+TimerCallback.cs
+WaitCallback.cs
+WaitHandle.cs
+WaitOrTimerCallback.cs