Commit Graph
29 Commits
Author SHA1 Message Date
Miguel de Icaza 6bf8dcac58 Apply Gert's version of the AutoResetEvent, and merge his test
into NUnit.

Test3 is known to be buggy (no harm, as our code just reports a 
warning from the iolayer)


svn path=/trunk/mcs/; revision=82419
2007-07-21 21:18:51 +00:00
Miguel de Icaza 2c2023cc46 2007-07-18 Miguel de Icaza <[email protected]>
* WaitHandle.cs (Handle): in the 2.0 profile, explicitly dispose
	the old SafeWaitHandle, do not wait for the finalizer to run;

	Take ownership of the handle;   The docs did not say that
	assigning to this value would lead to a leak, the docs said that
	in the 1.0 and 1.1 profiles assigning to this property might lead
	to a leak.   My mistake. 

	Fixes: 82134


svn path=/trunk/mcs/; revision=82258
2007-07-18 23:54:06 +00:00
Dick Porter fcc5135db0 2007-05-01 Dick Porter <[email protected]>
* ThreadState.cs: 
	* AsyncFlowControl.cs: 
	* Interlocked.cs: 
	* RegisteredWaitHandle.cs: 
	* TimerCallback.cs: 
	* ThreadStateException.cs: 
	* Monitor.cs: 
	* ThreadStart.cs: 
	* WaitOrTimerCallback.cs: 
	* LockCookie.cs: 
	* EventWaitHandle.cs: 
	* WaitHandle.cs: 
	* ThreadAbortException.cs: 
	* ThreadPriority.cs: 
	* ReaderWriterLock.cs: 
	* NativeOverlapped.cs: 
	* Mutex.cs: 
	* Overlapped.cs: 
	* ThreadPool.cs: 
	* ApartmentState.cs: 
	* EventResetMode.cs: 
	* SynchronizationLockException.cs: 
	* ManualResetEvent.cs: 
	* WaitCallback.cs: 
	* IOCompletionCallback.cs: 
	* AutoResetEvent.cs: 
	* AbandonedMutexException.cs: 
	* SendOrPostCallback.cs: 
	* ThreadInterruptedException.cs: Update to 2.0 profile



svn path=/trunk/mcs/; revision=76530
2007-05-01 15:28:29 +00:00
Miguel de Icaza 444f1ae2c0 Revert 67496 as it makes running Paint.NET impossible
svn path=/trunk/mcs/; revision=70392
2007-01-03 00:16:03 +00:00
Miguel de Icaza 48b34f32e8 This patch contains:
SafeWaitHandle support for WaitHandles (2.0)

        A few APIs implemented from Marshal.

2006-12-11  Miguel de Icaza  <[email protected]>

        * WaitHandle.cs: In 2.0 use SafeWaitHandles and the SafeWaitHandle
        patterns instead of using directly the IntPtr Handle.

        Refactor the code to reuse as much as possible, and follow the new
        conventions where appropriate.

2006-12-15  Miguel de Icaza  <[email protected]>

        * Marshal.cs (SecureStringToCoTaskMemAnsi, SecureStringToBSTR,
        SecureStringToCoTaskMemUnicode, ZeroFreeCoTaskMemAnsi,
        ZeroFreeCoTaskMemUnicode, ZeroFreeGlobalAllocAnsi,
        ZeroFreeGlobalAllocUnicode): Implement.

        (StringToCoTaskAuto): return the same as Ansi.

        The ANSI code is out of sync with Mono, which treats ANSI as
        UTF-8.

        Code formatting changes



svn path=/trunk/mcs/; revision=69552
2006-12-15 22:49:32 +00:00
Robert Jordan 26a197b7c1 2006-11-07 Robert Jordan <[email protected]>
* WaitHandle.cs: Don't assume Assembly.GetEntryAssembly () != null.
	Fixes bug #79859.


svn path=/trunk/mcs/; revision=67496
2006-11-07 21:13:05 +00:00
Atsushi Eno 272066a004 2006-07-04 Atsushi Enomoto <[email protected]>
* WaitHandle.cs : CheckArray() is also used in WaitAny(), so added
	  extra argument to skip STAThread check.


svn path=/trunk/mcs/; revision=62240
2006-07-04 09:50:41 +00:00
Duncan Mak 6be53f5a12 2006-06-30 Duncan Mak <[email protected]>
* WaitHandle.cs (CheckArray): Avoid using reflection unless we
	really need to.

svn path=/trunk/mcs/; revision=62181
2006-07-02 05:05:41 +00:00
Duncan Mak 13fd2ec3e5 2006-06-29 Duncan Mak <[email protected]>
* WaitHandle.cs (CheckArray): Throw NotSupportedException if the
	current thread is marked with the STAThreadAttribute. Fixes bug
	#78455.

svn path=/trunk/mcs/; revision=62144
2006-06-29 16:37:54 +00:00
Raja R Harinath e0cfa4925e Set svn:eol-style=native, delete svn:executable.
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)


svn path=/trunk/mcs/; revision=44558
2005-05-16 12:23:26 +00:00
Sebastien Pouliot 99a2b069e9 2005-03-24 Sebastien Pouliot <[email protected]>
* CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA 
	public key on GetCompressedStack method.
	* Mutex: Added LinkDemand for UnmanagedCode to create named (system 
	wide) mutexes.
	* Thread.cs: Added LinkDemand for ECMA public key on [Get|Set]
	CompressedStack methods.
	* WaitHandle.cs: Added LinkDemand and InheritanceDemand for 
	UnmanagedCode on set Handle property.


svn path=/trunk/mcs/; revision=42209
2005-03-24 13:50:32 +00:00
Miguel de Icaza 79bc0245c9 2004-12-05 Miguel de Icaza <[email protected]>
* AutoResetEvent.cs (Set, Reset): If we are disposed, throw a
	ObjectDisposedEvent, helped track the WebConnection destructor
	issue. 


svn path=/trunk/mcs/; revision=37157
2004-12-05 23:07:35 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Lluis Sanchez 0f75c6d4a4 * ReaderWriterLock.cs: Changed some methods to private.
* WaitHandle.cs: In Wait methods, release the synchronization context when
	  exitContext is true.

svn path=/trunk/mcs/; revision=25215
2004-04-08 11:37:30 +00:00
Duncan Mak a2b66b251f * DateTimeFormatInfo.cs: theInvariantDateTimeFormatInfo should not
be public.

* StreamReader.cs (Initialize): This method is not exposed in the
API, mark as internal.

* SignatureHelper.cs: This class does not have the
SerializableAttribute.

* WaitHandle.cs (CheckDisposed): This method is not in the public
API, mark it as 'internal'.

* Environment.cs (SpecialFolder): Added 'Desktop' and 'MyComputer'
as values for NET_1_1.
(GetFolderPath): Return the empty string ("") for values of
SpecialFolder that have no corresponding equivalents in
Linux. Return "$HOME/Desktop" for SpecialFolder.DesktopDirectory
and "$HOME" for SpecialFolder.Personal.

* IntPtr.cs (GetObjectData): Mark it as an interface
implementation, instead of a public method.

* Guid.cs (NewGuid): Remove MonoTODOAttribute.

* TypeLoadException.cs (GetObjectData):
Create stubs for the fields that are being serialized.

* UIntPtr.cs: Removed erroneous CLSCompliantAttributes.

svn path=/trunk/mcs/; revision=16594
2003-07-24 03:28:43 +00:00
Dick Porter 47504ddaa6 2003-06-25 Dick Porter <[email protected]>
* WaitHandle.cs: Default handle value should be InvalidHandle, not
	Zero.

svn path=/trunk/mcs/; revision=15631
2003-06-25 17:04:15 +00:00
Gonzalo Paniagua Javier 89a8bd709d 2003-06-21 Gonzalo Paniagua Javier <[email protected]>
* ThreadPool.cs: correctly create a TimeSpan with provided the number of
	milliseconds.

	* WaitHandle.cs: fixes for WaitAny/All and TimeSpan.

svn path=/trunk/mcs/; revision=15535
2003-06-21 15:14:35 +00:00
Gonzalo Paniagua Javier c285b7f200 2003-06-06 Gonzalo Paniagua Javier <[email protected]>
* WaitHandle.cs: checks and exceptions.

svn path=/trunk/mcs/; revision=15155
2003-06-06 10:13:32 +00:00
Gonzalo Paniagua Javier 0d4db04781 2003-06-02 Gonzalo Paniagua Javier <[email protected]>
* NativeEventCalls.cs: added CloseEvent_intenal.
	* WaitHandle.cs: call CloseEvent_internal when disposing.

svn path=/trunk/mcs/; revision=15072
2003-06-02 19:07:52 +00:00
Dick Porter 21374e28f0 2002-12-10 Dick Porter <[email protected]>
* Monitor.cs:
	* Thread.cs:
	* ThreadPool.cs:
	* Timer.cs:
	* WaitHandle.cs: Use TotalMilliseconds to convert a TimeSpan to
	ms, not Milliseconds.

svn path=/trunk/mcs/; revision=9533
2002-12-10 18:02:55 +00:00
Dick Porter c77d9a071f 2002-09-11 Dick Porter <[email protected]>
* Mutex.cs:
	* ManualResetEvent.cs:
	* AutoResetEvent.cs: Use the WaitHandle.Handle property instead of
	the private field

	* WaitHandle.cs: Hide the os_handle field and the WaitOne_internal
	method

svn path=/trunk/mcs/; revision=7361
2002-09-11 15:01:31 +00:00
Gonzalo Paniagua Javier 5bf2383288 2002-08-27 Gonzalo Paniagua Javier <[email protected]>
* System.IO/BinaryReader.cs:
	* System.IO/BinaryWriter.cs:
	* System.IO/MemoryStream.cs:
	* System.IO/StreamReader.cs:
	* System.IO/StreamWriter.cs:
	* System.IO/StringReader.cs:
	* System.IO/StringWriter.cs:
	* System.IO/TextWriter.cs:
	* System.Threading/WaitHandle.cs: IDisposable fixes.

svn path=/trunk/mcs/; revision=7118
2002-08-28 02:30:47 +00:00
Veronica De Santis 169190f49b 2002-01-16 Veronica De Santis <veron78@@interfree.it>
* icall.h : Added the internal calls mapping for CreateMutex_internal
	  	    and ReleaseMutex_internal.

	* threads.h : Added the prototype of mutexes internal calls.

	* threads.c : Added the implementations of mutexes internal calls.

	* WaitHandle.cs : Renamed handle to os_handle and make it protected
	                  instead of private.
        * Mutex.cs : Write the System.Threading.Mutex methods ( constructors
              	     and the ReleaseMutex)

svn path=/trunk/mcs/; revision=2010
2002-01-16 21:08:04 +00:00
Dick Porter 5f6d81eebc 2002-01-15 Dick Porter <[email protected]>
* WaitHandle.cs:
	* Thread.cs: Make the runtime's idea of infinite timeouts coincide
	with the class library's

svn path=/trunk/mcs/; revision=1990
2002-01-15 13:28:41 +00:00
Dick Porter a4f1ad32eb 2002-01-10 Dick Porter <[email protected]>
* WaitHandle.cs: Added checks for too many handles and null
	handles in WaitAll() and WaitAny

svn path=/trunk/mcs/; revision=1943
2002-01-10 10:59:44 +00:00
Ravi Pratap M 0f04441d63 002-01-05 Ravi Pratap <[email protected]>
* AutoResetEvent.cs, ManualResetEvent.cs, Monitor.cs : MonoTODO
	decoration.

	* Mutex.cs, Overlapped.cs, ReaderWriterLock.cs, RegisteredWaitHandle.cs,
	Thread.cs, ThreadAbortException.cs, ThreadPool.cs, Timer.cs, WaitHandler.cs : Ditto.

svn path=/trunk/mcs/; revision=1850
2002-01-05 06:26:59 +00:00
Dick Porter d5c948c036 2001-12-11 Dick Porter <[email protected]>
* Linux.cs: IO implemented with file handles with internal calls,
	rather than casting file descriptors for C library p/invokes.
	Implemented Get/Set Creation/LastAccess/LastWrite TimeFile
	functions.

2001-12-11  Dick Porter  <[email protected]>

	* FileStream.cs: Use handles rather than casting file descriptors.
	Added Handle property.

2001-12-11  Dick Porter  <[email protected]>

	* DateTime.cs: Implemented FromFileTime() and ToFileTime()

	* Console.cs: Use handles rather than casting file descriptors

2001-12-11  Dick Porter  <[email protected]>

	* WaitHandle.cs: Implemented WaitAll(), WaitAny() and WaitOne() as
	internal calls.

svn path=/trunk/mcs/; revision=1557
2001-12-11 16:59:43 +00:00
Dick Porter 7881d9719c 2001-09-21 Dick Porter <[email protected]>
* Thread.cs: Implement Thread(ThreadStart) constructor and Start()
	with an internal call

	* WaitHandle.cs: Close calls Dispose(false)

2001-09-21  Dick Porter  <[email protected]>

	* ThreadExceptionEventArgs.cs: Implemented

svn path=/trunk/mcs/; revision=909
2001-09-21 10:45:31 +00:00
Dick Porter 58b4ee1b2c System.Threading class stubs.
svn path=/trunk/mcs/; revision=810
2001-09-13 12:47:25 +00:00