Commit Graph
49 Commits
Author SHA1 Message Date
Marek Safar 93e31cbc63 Ignore SynchronizationAttribute on MT 2013-03-07 16:34:23 +01:00
Rodrigo Kumpera 1b92a4148c Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs. 2013-02-11 18:42:18 -05:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Marek Safar c722897b1f Remove unwanted WaitHandle finalizer 2011-10-25 10:14:14 +01:00
Zoltan Varga 8541b2548a Add locking to EventWaitHandle.Set/Reset to avoid crashes when another thread disposes the handle. Fixes #1499. 2011-10-17 15:13:25 +02:00
Sebastien Pouliot 2ce9fc1b0e Ensure consistency when 'emitContext == true' is used in MONOTOUCH profile (since it won't work when the linker is enabled). Fix bug #1144 2011-10-05 17:30:26 -04:00
Rolf Bjarne Kvinge f64261401d Fix many corcompare issues for moonlight 2011-03-31 16:05:03 +02:00
Geoff Norton 83e999b7d7 Add pfx to the mobile profile 2011-01-25 01:51:17 -05:00
Marek Safar abd9a33306 Keep only 1 Dispose implementation 2010-10-25 18:55:05 +01:00
Gonzalo Paniagua Javier b243455a19 4.0
svn path=/trunk/mcs/; revision=152118
2010-02-20 07:35:54 +00:00
Zoltan Varga 00bdc8dcca 2010-02-08 Zoltan Varga <[email protected]>
* WaitHandle.cs (CheckArray): Check that the handles array is not null.
	Fixes #576039.

svn path=/trunk/mcs/; revision=151017
2010-02-08 10:24:21 +00:00
Miguel de Icaza 5e63701d4b 2009-11-02 Miguel de Icaza <[email protected]>
* Jumbo patch to drop support for pre-NET_2_0 code:

        Remove ONLY_1_1 code
        Remove NET_1_0 only code
        Remove NET_2_0 defines assuming the value is true.


svn path=/trunk/mcs/; revision=145230
2009-11-02 23:22:40 +00:00
Sebastien Pouliot dff2c0d12a In System.Threading:
2009-10-21  Sebastien Pouliot  <[email protected]>

	* WaitHandle.cs: Add missing validations for 'millisecondsTimeout'
	in Wait[One|Any|All]. Also call the overloaded (bool) methods for
	WaitAll to reduce code duplication.

In .:
2009-10-21  Sebastien Pouliot  <[email protected]>

	* corlib_test.dll.sources: Add System.Threading/WaitHandleTest.cs

In Test/System.Threading:
2009-10-21  Sebastien Pouliot  <[email protected]>

	* WaitHandleTest.cs: New. Add test cases for Wait[One|All|Any]
	methods overloads (at least the one present in Silverlight 2)


svn path=/trunk/mcs/; revision=144529
2009-10-21 12:18:22 +00:00
Gonzalo Paniagua Javier 6ea7633b75 2009-04-12 Gonzalo Paniagua Javier <[email protected]>
* System.Threading/WaitHandle.cs: implemented 2 missing WaitAny overloads.
	* corlib.dll.sources: add GCNotificationStatus.
	* System/GCNotificationStatus.cs: new enum.


svn path=/trunk/mcs/; revision=131542
2009-04-12 14:11:18 +00:00
Rolf Bjarne Kvinge 07afb3c06e 2009-03-05 Rolf Bjarne Kvinge <[email protected]>
* WaitHandle.cs: Added missing WaitOne overload.


svn path=/trunk/mcs/; revision=128681
2009-03-05 11:54:52 +00:00
Gonzalo Paniagua Javier 82d585aa40 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
* WaitHandle.cs: implemented SignalAndWait.

svn path=/trunk/mcs/; revision=127565
2009-02-20 20:24:37 +00:00
Miguel de Icaza 7cf4a8d941 Add a handful of 3.5 methods
svn path=/trunk/mcs/; revision=121919
2008-12-20 07:46:21 +00:00
Miguel de Icaza e8d43117d2 2008-09-19 Miguel de Icaza <[email protected]>
* WaitHandle.cs (WaitOne): Add new 3.5 SP1 overload.

svn path=/trunk/mcs/; revision=113582
2008-09-19 20:21:12 +00:00
Sebastien Pouliot 4c1daadb0e 2008-02-03 Sebastien Pouliot <[email protected]>
* WaitHandle.cs: Ifdef out some unused code (found by Gendarme).


svn path=/trunk/mcs/; revision=94708
2008-02-03 18:29:17 +00:00
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