Commit Graph
149 Commits
Author SHA1 Message Date
Marek Safar 3086e99d75 Warnings cleanup
svn path=/trunk/mcs/; revision=146142
2009-11-13 14:52:59 +00:00
Miguel de Icaza 7f825c2dbe More NET_2_0 removal
svn path=/trunk/mcs/; revision=145236
2009-11-03 01:08:45 +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 ccffcae90d 2009-11-02 Sebastien Pouliot <[email protected]>
* Thread.cs (set_CurrentUICulture): Delay setting in_currentculture
	to true until after the null check and the return statement.


svn path=/trunk/mcs/; revision=145214
2009-11-02 20:05:35 +00:00
Sebastien Pouliot b6a5bb1207 In System.Threading:
2009-10-25  Sebastien Pouliot  <[email protected]>

	* Thread.cs: Fix validations for Join and Sleep overloads

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

	* ThreadTest.cs: Add test cases for Current[UI]Culture (not 
	working), Name, Join, Sleep and SpinWait


svn path=/trunk/mcs/; revision=144824
2009-10-25 16:41:18 +00:00
Jb Evain d40cd894df 2009-10-20 Jb Evain <[email protected]>
* Thread.cs: change type of the current_appcontext field to object
	to avoid triggering static constructors unless explicitely required.


svn path=/trunk/mcs/; revision=144431
2009-10-20 09:03:19 +00:00
Geoff Norton 88026a47b4 fix MONOTOUCH on trunk
svn path=/trunk/mcs/; revision=144133
2009-10-14 18:49:14 +00:00
Sebastien Pouliot c85fce7f73 2009-10-07 Sebastien Pouliot <[email protected]>
* Thread.cs: Remove LocalDataStoreSlot-related methods from
	Moonlight build


svn path=/trunk/mcs/; revision=143629
2009-10-07 12:31:16 +00:00
Mark Probst 1d313a8230 2009-09-30 Mark Probst <[email protected]>
* Thread.cs: Remove serialized culture icall stuff from
	InternalThread.  Implement it by using the cross-domain byte array
	transfer icalls.

	* Environment.cs: Corlib version bump.

svn path=/trunk/mcs/; revision=143040
2009-09-30 16:09:56 +00:00
Rolf Bjarne Kvinge 2994492806 2009-09-29 Rolf Bjarne Kvinge <[email protected]>
* Thread.cs: StartSafe: ignore ThreadAbortExceptions.

svn path=/trunk/mcs/; revision=142847
2009-09-29 10:59:54 +00:00
Mark Probst 1c5ff76d6c 2009-09-26 Mark Probst <[email protected]>
* Thread.cs: Serialize the principal so as not to make it cross
	appdomains.  Two new internal calls for copying byte arrays
	between domains.

2009-09-26  Mark Probst  <[email protected]>

	* Environment.cs: Corlib version bump.

svn path=/trunk/mcs/; revision=142671
2009-09-26 11:20:02 +00:00
Mark Probst 0473dde9f7 2009-09-25 Mark Probst <[email protected]>
* Thread.cs: The Thread class is split up into Thread and
	InternalThread now.  We have exactly one InternalThread per
	thread, and at most one Thread per appdomain per thread.  Most
	data is stored in InternalThread.  All InternalThread objects live
	in the root domain.

	* Environment.cs: Corlib version bump.

svn path=/trunk/mcs/; revision=142661
2009-09-25 21:48:40 +00:00
Sebastien Pouliot f07228a460 2009-09-23 Sebastien Pouliot <[email protected]>
* ExecutionContext.cs: Don't use SecurityContext and don't expose
	AsyncFlowControl for NET_2_1
	* ThreadAbortException.cs: Remove ExceptionState from NET_2_1
	* Thread.cs: Don't expose ApartmentState and remove Suspend and
	Resume methods for NET_2_1
	* ThreadPool.cs: Remove GetAvailableThreads and Unsafe* methods
	for NET_2_1


svn path=/trunk/mcs/; revision=142481
2009-09-23 12:58:58 +00:00
Sebastien Pouliot a0818feb95 2009-09-22 Sebastien Pouliot <[email protected]>
* Thread.cs: Remove [Get|Set]CompressedStack for NET_2_1


svn path=/trunk/mcs/; revision=142401
2009-09-22 13:40:55 +00:00
Sebastien Pouliot 5d0ed14755 In System.Threading:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* Thread.cs: Remove CurrentPrincipal property for NET_2_1
	* ExecutionContext.cs: Remove Run method for NET_2_1

In System.Security:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* SecurityContext.cs: Don't use WindowsIdentity under NET_2_1

In System:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* AppDomain.cs: Remove use of IPrincipal, Evidence and 
	PermissionSet types for NET_2_1

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

	* net_2_1_bootstrap_corlib.dll.sources, net_2_1_raw_corlib.dll.sources:
	Remove most of System.Security.Policy and System.Security.Principal
	and more of System.Security.Permissions from NET_2_1 build

In System.Security.Policy:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* PolicyLevel_2_1.cs: Remove use of PolicyStatement


svn path=/trunk/mcs/; revision=142324
2009-09-21 11:54:24 +00:00
Zoltan Varga f1fd210aab 2009-08-03 Zoltan Varga <[email protected]>
* Thread.cs: Always call Thread_free_internal from the finalizer, since
	it frees other things besides the handle. Fixes #527576.

svn path=/trunk/mcs/; revision=139281
2009-08-03 13:28:59 +00:00
Jb Evain 6fe38f5790 2009-07-20 Jb Evain <[email protected]>
* Thread.cs: use the moonlight specific thread start
	hack for the net_2_1 profile exclusively.


svn path=/trunk/mcs/; revision=138225
2009-07-20 16:03:23 +00:00
Bill Holmes 48cfa18d07 2009-06-22 Bill Holmes <[email protected]>
* object-internals.h : Adding interrupt_on_stop field.

	* threads.c (mono_thread_request_interruption) : On Windows exit the
	  thread if interrupt_on_stop is set.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
	  Removing old interrupt logic and setting the interrupt_on_stop for the
	  thread when calling accept.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
	  setting the interrupt_on_stop for the thread when calling accept.

	* Thread.cs : Adding interrupt_on_stop field.

	Contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=136628
2009-06-22 17:41:26 +00:00
Rolf Bjarne Kvinge 003f517773 2009-06-10 Rolf Bjarne Kvinge <[email protected]>
* Thread.cs: MoonlightUnhandledException: ensure there's no way to
	reach native code with a managed exception.

svn path=/trunk/mcs/; revision=135897
2009-06-10 22:17:32 +00:00
Sebastien Pouliot bd19dacb39 2009-06-10 Sebastien Pouliot <[email protected]>
* Thread.cs: Refactor calling Moonlight's OnUnhandledException to 
	make sur the delegate it not called from a [SecuritySafeCritical]
	caller.
	* ThreadPool.cs: Reuse the above code for QueueUserWorkItem. 
	Original patch from Alan McGovern


svn path=/trunk/mcs/; revision=135866
2009-06-10 17:17:55 +00:00
Mark Probst 5bb6e7f1dc 2009-05-26 Mark Probst <[email protected]>
* Thread.cs: Don't set the execution context when creating a
        thread because the _ec member is thread static and we set the
        wrong one.  It's now set by the runtime.  We just provide the
        correct one.

        * Environment.cs: Bump corlib version.

svn path=/trunk/mcs/; revision=134773
2009-05-26 16:06:58 +00:00
Mark Probst 322f82badc 2009-04-21 Mark Probst <[email protected]>
* Thread.cs: Make the execution context field thread-static to
        avoid it being shared between app domains.

2009-04-21  Mark Probst  <[email protected]>

        * Environment.cs: Bump corlib version.

svn path=/trunk/mcs/; revision=132308
2009-04-21 18:39:48 +00:00
Rolf Bjarne Kvinge 42a3e10016 2009-04-20 Rolf Bjarne Kvinge <[email protected]>
* Thread.cs: For 2.1 ensure exceptions in threads are handled using the
	UnhandledException event mechanism in System.Windows.Application instead
	of crashing the application.


svn path=/trunk/mcs/; revision=132166
2009-04-20 12:57:02 +00:00
Mark Probst 7466b0e42e 2009-04-18 Mark Probst <[email protected]>
* NumberFormatter.cs: Keep the current thread's number formatter
        as a ThreadStatic member.

2009-04-18  Mark Probst  <[email protected]>

        * Thread.cs: Don't keep the current number formatter here
        because it's shared between app domains.

svn path=/trunk/mcs/; revision=132067
2009-04-17 23:32:33 +00:00
Mark Probst 88270f8ee7 Proper app domain separation regarding thread abort exception state.
2009-04-18  Mark Probst  <[email protected]>

        * Thread.cs: Make the abort exception state a GC handle, to
        properly separate AppDomains.  Add internal method for getting the
        state object.

        * ThreadAbortException.cs: Get the abort exception state via the
        method in Thread.

2009-04-18  Mark Probst  <[email protected]>

        * Environment.cs: Bump corlib version.

svn path=/trunk/mcs/; revision=132063
2009-04-17 23:01:02 +00:00
Paolo Molaro 6a71988302 Tue Sep 16 21:02:59 CEST 2008 Paolo Molaro <[email protected]>
* Thread.cs: fixed SpinWait() implementation (bug #423582).


svn path=/trunk/mcs/; revision=113209
2008-09-16 19:05:54 +00:00
Marek Safar 159314e044 Warnings cleanup
svn path=/trunk/mcs/; revision=111730
2008-08-27 18:28:16 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +00:00
Kornél Pál 2d861bf887 * Thread.cs: Implement BeginThreadAffinity and EndThreadAffinity as no-op because managed and native threads are currently bound together.
svn path=/trunk/mcs/; revision=106145
2008-06-18 18:15:24 +00:00
Zoltan Varga e492e68db8 2008-06-14 Zoltan Varga <[email protected]>
* Thread.cs: Sync layout with unmanaged side.

svn path=/trunk/mcs/; revision=105811
2008-06-13 22:45:17 +00:00
Zoltan Varga 2eacc0fdf5 2008-04-11 Zoltan Varga <[email protected]>
* Thread.cs: Make in_currentculture non-static. Fixes #378892.

svn path=/trunk/mcs/; revision=100464
2008-04-11 18:50:22 +00:00
Dick Porter 68eaed43c0 2008-04-07 Dick Porter <[email protected]>
* Thread.cs: Fix throwing of exceptions when manipulating
	ApartmentState.  Fixes part of bug 324338.



svn path=/trunk/mcs/; revision=100010
2008-04-07 11:12:10 +00:00
Eyal Alalouf 41501f96be Improve ToString perf of primitive types.
svn path=/trunk/mcs/; revision=99502
2008-04-01 11:37:11 +00:00
Massimiliano Mantione 7633bb9b56 Thread.cs: Renamed "unused6" because it will be used to hold the "mono_thread_manage" callback.
svn path=/trunk/mcs/; revision=99029
2008-03-26 13:12:22 +00:00
Paolo Molaro 5e0ee89e62 Fri Feb 22 11:23:53 CET 2008 Paolo Molaro <[email protected]>
* Thread.cs: implemented Begin/EndCriticalRegion.


svn path=/trunk/mcs/; revision=96410
2008-02-22 09:39:36 +00:00
Zoltan Varga 37ab41a282 2008-01-06 Zoltan Varga <[email protected]>
* Thread.cs (set_CurrentCulture): If the culture is read-only, cache the result
	of serializing it.
	(set_CurrentUICulture): Ditto.

svn path=/trunk/mcs/; revision=92335
2008-01-06 11:05:05 +00:00
Zoltan Varga a278bd3b4d 2008-01-03 Zoltan Varga <[email protected]>
* Thread.cs (set_CurrentCulture): Avoid the serialization overhead if
	the new culture is equal to the old one.

svn path=/trunk/mcs/; revision=92201
2008-01-03 19:05:50 +00:00
Zoltan Varga f42cbf51d2 2007-12-27 Zoltan Varga <[email protected]>
* Thread.cs: Change the type of synch_cs to an IntPtr to be in synch with the
	unmanaged definition.

svn path=/trunk/mcs/; revision=91908
2007-12-26 22:43:39 +00:00
Dick Porter 2b101808d8 2007-10-24 Dick Porter <[email protected]>
* Thread.cs: Call Thread_init on the new 2.0 constructors too.



svn path=/trunk/mcs/; revision=88120
2007-10-24 19:54:52 +00:00
Dick Porter eb888d87d3 2007-10-24 Dick Porter <[email protected]>
* Thread.cs: Assign the ManagedThreadId when it is asked for,
	rather than in the constructor, so ThreadPool threads also work.
	Fixes bug 335579 (and doesn't break 325367 or 325566)



svn path=/trunk/mcs/; revision=88077
2007-10-24 15:35:52 +00:00
Dick Porter df3e7290d7 2007-10-15 Dick Porter <[email protected]>
* Thread.cs: Initialise synch_cs to null now we aren't using it as
	a monitor lock


svn path=/trunk/mcs/; revision=87515
2007-10-15 14:49:07 +00:00
Dick Porter 685b17b2cb 2007-09-25 Dick Porter <[email protected]>
* Thread.cs: Keep ManagedThreadId constant over the lifetime of a
	Thread.  Patch from [email protected] fixing bugs 325367 and
	325566.



svn path=/trunk/mcs/; revision=86337
2007-09-25 15:28:09 +00:00
Dick Porter fa099c86ac Back out the thread lock changes until they work
svn path=/trunk/mcs/; revision=85137
2007-08-31 15:40:49 +00:00
Dick Porter d6a38965e2 2007-08-30 Dick Porter <[email protected]>
* Thread.cs: Initialise synch_cs to null now we aren't using it as
	a monitor lock



svn path=/trunk/mcs/; revision=85074
2007-08-30 20:33:52 +00:00
Dick Porter 90542ec8a6 2007-08-10 Gert Driesen <[email protected]>
* Thread.cs: Throw ThreadStateException when retrieving ApartmentState
	or IsBackground if thread is stopped. Fixes bug #81658.

2007-08-10  Gert Driesen  <[email protected]>

	* ThreadTest.cs: Enabled test for bug #81658.


svn path=/trunk/mcs/; revision=83806
2007-08-10 10:18:07 +00:00
Zoltan Varga 126a269c29 2007-08-08 Zoltan Varga <[email protected]>
* Thread.cs: Add a fixme.

svn path=/trunk/mcs/; revision=83682
2007-08-08 17:02:06 +00:00
Jonathan Chambers 072ddf092b 2007-05-22 Jonathan Chambers <[email protected]>
* Thread.cs: Use & to check ThreadState rather than ==.
        Fixes AlbumSurfer regression.


svn path=/trunk/mcs/; revision=77799
2007-05-22 17:25:07 +00:00
Jonathan Chambers e706c6bfd2 2007-05-09 Jonathan Chambers <[email protected]>
* Thread.cs: Add ApartmentState related tests.


svn path=/trunk/mcs/; revision=77078
2007-05-09 18:34:13 +00:00
Paolo Molaro 25af0d0ca2 Tue Jan 23 17:43:50 CET 2007 Paolo Molaro <[email protected]>
* Thread.cs: mark the GC-tracked field with UIntPtr.


svn path=/trunk/mcs/; revision=71518
2007-01-23 16:44:13 +00:00
Miguel de Icaza 7ad3e574df Rationalize MonoTODO
svn path=/trunk/mcs/; revision=68718
2006-11-30 00:32:00 +00:00