Commit Graph
20 Commits
Author SHA1 Message Date
Rodrigo Kumpera 83dccf8fe7 Add all missing sequential layout directives to corlib and system. 2011-12-13 11:57:23 -02:00
Jérémie Laval 599332d0e9 [SafeHandle] Fixing docs 2010-12-02 10:40:09 +00:00
Jérémie Laval 2c5ff41b8b [SafeHandle] Add bits of documentation 2010-12-01 20:00:53 +00:00
Jérémie Laval 4f56dfeaa3 [SafeHandle] Make success parameter setting atomic wrt async exception in DangerousAddRef 2010-12-01 20:00:52 +00:00
Jérémie Laval 0597ee873f [SafeHandle] Protect Close against asynchronous exceptions 2010-12-01 20:00:52 +00:00
Miguel de Icaza 2b35d60a5a 2010-04-02 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Use refcount == -1 to indicate that the handle
        had been closed.

        The problem here is that we have no records of why the code that
        threw a ObjectDisposedException inside the do { } while block on
        DangerousAddRef was added.   It seems it was added in response to
        Close() methods being called and the need to throw that exception
        on further calls to ObjectDisposedException.

        Sadly, we have no test suites for that.


svn path=/trunk/mcs/; revision=154741
2010-04-02 21:49:40 +00:00
Miguel de Icaza 141bcfb930 Jumbo NET_2_0 removal
svn path=/trunk/mcs/; revision=145235
2009-11-03 01:07:23 +00:00
Marek Habersack fe15b22c9e Revert r130049
svn path=/trunk/mcs/; revision=130110
2009-03-24 08:48:23 +00:00
Marek Habersack 82bbdb387b 2009-03-23 Marek Habersack <[email protected]>
* ConsoleTest.cs: added a bunch of tests for the standard input,
	output and error stream properties.

2009-03-23  Marek Habersack  <[email protected]>

	* FileStreamTest.cs: added a bunch of tests for SafeFileHandle
	constructors

2009-03-23  Marek Habersack  <[email protected]>

	* Console.cs: OpenStandard{Input,Output,Error} no longer use
	FileStream on 2.0+. The reason is that SafeFileHandle used in the
	stream doesn't allow handles with values <= 0, and on Unix stdin
	is 0 which would break the Console class. Instead of FileStream,
	introduced a simple internal specialized stream which is used in
	this scenario.

2009-03-23  Marek Habersack  <[email protected]>

	* FileStream.cs: implemented full support for SafeFileHandle in
	2.0. The obsolete constructors taking an IntPtr now wrap it in a
	SafeFileHandle.

2009-03-23  Marek Habersack  <[email protected]>

	* SafeHandle.cs: added an internal property, OwnsHandle, used by
	FileStream.

svn path=/trunk/mcs/; revision=130049
2009-03-23 12:57:04 +00:00
Sebastien Pouliot 13e2f8da3f 2009-02-24 Sebastien Pouliot <[email protected]>
* SafeHandle.cs: Add default ctor in 2.1 profile (needed to compile
	new unit tests in moonlight).


svn path=/trunk/mcs/; revision=127861
2009-02-24 13:19:52 +00:00
Atsushi Eno 56c9656fd4 another set of cosmetic 2.0 API fixes.
svn path=/trunk/mcs/; revision=83679
2007-08-08 16:25:59 +00:00
Miguel de Icaza 9c8e7cd0c7 2007-07-18 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Harden this, do not call ReleaseHandle if the
	handle is invalid.

	* CriticalHandle.cs: Harden this, do not call ReleaseHandle if the
	handle is invalid. 



svn path=/trunk/mcs/; revision=82260
2007-07-19 00:20:40 +00:00
Dick Porter a084d7f6f3 2007-05-02 Dick Porter <[email protected]>
* _ConstructorInfo.cs: 
	* _EventInfo.cs: 
	* _Exception.cs: 
	* _FieldInfo.cs: 
	* _MemberInfo.cs: 
	* _MethodBase.cs: 
	* _MethodInfo.cs: 
	* _PropertyInfo.cs: 
	* _Type.cs: 
	* UCOMIMoniker.cs: 
	* AutomationProxyAttribute.cs: 
	* BestFitMappingAttribute.cs: 
	* BStrWrapper.cs: 
	* ClassInterfaceAttribute.cs: 
	* CoClassAttribute.cs: 
	* ComAliasNameAttribute.cs: 
	* ComCompatibleVersionAttribute.cs: 
	* ComConversionLossAttribute.cs: 
	* ComDefaultInterfaceAttribute.cs: 
	* ComEventInterfaceAttribute.cs: 
	* COMException.cs: 
	* ComImportAttribute.cs: 
	* ComObjectInUseException.cs: 
	* ComRegisterFunctionAttribute.cs: 
	* ComUnregisterFunctionAttribute.cs: 
	* ComVisible.cs: 
	* CriticalHandle.cs: 
	* CurrencyWrapper.cs: 
	* DefaultCharSetAttribute.cs: 
	* DispatchWrapper.cs: 
	* DispIdAttribute.cs: 
	* ErrorWrapper.cs: 
	* ExtensibleClassFactory.cs: 
	* ExternalException.cs: 
	* Marshal.cs: 
	* SafeHandle.cs: 
	* StructLayoutAttribute.cs: 
	* TypeLibConverter.cs: 
	* ArrayWithOffset.cs: 
	* BIND_OPTS.cs: 
	* BINDPTR.cs: 
	* CONNECTDATA.cs: 
	* DISPPARAMS.cs: 
	* ELEMDESC.cs: 
	* EXCEPINFO.cs: 
	* PARAMDESC.cs: 
	* TYPELIBATTR.cs: 
	* VARDESC.cs: 
	* CALLCONV.cs: 
	* CallingConvention.cs: 
	* CharSet.cs: 
	* ClassInterfaceType.cs: 
	* ComInterfaceType.cs: 
	* ComMemberType.cs: 
	* DESCKIND.cs: 
	* ExporterEventKind.cs: 
	* PARAMFLAG.cs: 
	* RegistrationClassContext.cs: 
	* TYPEKIND.cs: 
	* TypeLibImporterFlags.cs: 
	* UnmanagedType.cs: 
	* VARFLAGS.cs: Update to 2.0 profile



svn path=/trunk/mcs/; revision=76579
2007-05-02 16:38:28 +00:00
Miguel de Icaza 0c2553a2bf 2007-01-03 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Do not use locks in SafeHandle to protect the
	access to the refcount, use Interlocked.CompareExchange.  The
	locks were the source of problems with domain finalization when
	this code was enabled.

	This should fix Matt Hargett's bug report with a full `make check'
	that reported variations of:

	** (../../class/lib/net_2_0/nunit-console.exe:29644): WARNING **:
	Finalization of domain <domainname> timed out.

	Also, it is a lot lighther.


svn path=/trunk/mcs/; revision=70433
2007-01-03 19:50:44 +00:00
Miguel de Icaza 24f79898c5 2006-12-11 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Fix a handful of bugs, and add tests for them.
	Only release the handle if its owned by us.  Also throw
	ObjectDisposedException's


svn path=/trunk/mcs/; revision=69378
2006-12-12 00:40:52 +00:00
Miguel de Icaza a7aa6fc381 The managed side:
2006-12-11  Miguel de Icaza  <[email protected]>

	* SafeHandle.cs: Implement finalizer.

	DangerousAddRef will now throw an exception if the object was
	disposed.

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

	* SafeFileHandle.cs: Implement this one.



svn path=/trunk/mcs/; revision=69296
2006-12-11 06:48:40 +00:00
Miguel de Icaza 5c6fc3889d 2006-12-02 Miguel de Icaza <[email protected]>
* SafeHandle.cs: Implement this class.

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

	* SafeFileHandle.cs: Remove the IsInvalid method, as that is
	present in the base class.


svn path=/trunk/mcs/; revision=68875
2006-12-02 05:27:35 +00:00
Miguel de Icaza 61baf96128 Rationalize MonoTODO
svn path=/trunk/mcs/; revision=68716
2006-11-30 00:31:29 +00:00
Ben Maurer 2075f554c9 In Microsoft.Win32.SafeHandles:
2006-01-12  Ben Maurer  <[email protected]>

	* SafeHandleZeroOrMinusOneIsInvalid.cs: Update to RTM api

	* SafeFileHandle.cs: Update to RTM api

In System.Runtime.InteropServices:
2006-01-12  Ben Maurer  <[email protected]>

	* SafeHandle.cs: Update to RTM api


svn path=/trunk/mcs/; revision=55474
2006-01-13 03:20:13 +00:00
Zoltan Varga dc17f0c8b8 2005-08-10 Zoltan Varga <[email protected]>
* SafeHandle.cs: New file.

svn path=/trunk/mcs/; revision=48223
2005-08-10 13:30:19 +00:00