Commit Graph
79 Commits
Author SHA1 Message Date
Sebastien Pouliot d465dc4044 Oops, forgot the important fix. Return a copy (not the original) CompressedStack.
svn path=/trunk/mcs/; revision=44392
2005-05-11 15:17:37 +00:00
Sebastien Pouliot d2fd4e1398 2005-05-11 Sebastien Pouliot <[email protected]>
* CompressedStack.cs: Allow merging of an existing CompressedStack
	with the actual stack of the current Thread.
	* Thread.cs: GetCompressedStack and SetCompressedStack are public 
	before 2.0 but couldn't be seen with mono-api-info because of it's 
	LinkDemand for the ECMA public key. Removed unused CompressedStack
	private field (now part of the ExecutionContext).


svn path=/trunk/mcs/; revision=44391
2005-05-11 15:15:01 +00:00
Sebastien Pouliot 44f58bea8c 2005-04-28 Sebastien Pouliot <[email protected]>
* Thread.cs: Added property to get the ExecutionContext in 2.0. Fixed
	GetCompressedStack and made SetCompressedStack available (as internal)
	before NET_2_0.


svn path=/trunk/mcs/; revision=43721
2005-04-28 13:30:19 +00:00
Sebastien Pouliot 14ad7cf334 2005-04-28 Sebastien Pouliot <[email protected]>
* Thread.cs: Added internal property to get the ExecutionContext.

svn path=/trunk/mcs/; revision=43716
2005-04-28 12:18:44 +00:00
Zoltan Varga 920feb07d2 2005-04-19 Zoltan Varga <[email protected]>
* Thread.cs: Add some unused fields.

svn path=/trunk/mcs/; revision=43296
2005-04-19 20:53:39 +00:00
Miguel de Icaza 3953436009 Second patch of patch from Zoltan Varga for bug:
http://bugzilla.ximian.com/show_bug.cgi?id=71274

svn path=/trunk/mcs/; revision=43283
2005-04-19 19:09:54 +00:00
Gonzalo Paniagua Javier f5faf8be5d 2005-04-07 Gonzalo Paniagua Javier <[email protected]>
* Thread.cs: clear the Unstarted bit before calling Start_internal.
	Fixes bug #72738.


svn path=/trunk/mcs/; revision=42664
2005-04-07 23:47:56 +00:00
Ben Maurer 4c0c7d2b7c 2005-04-04 Ben Maurer <[email protected]>
* Thread.cs: Do argument checking for Current[UI]Culture to make
	the exception more clear for a null value being set.


svn path=/trunk/mcs/; revision=42535
2005-04-04 19:23:07 +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
Zoltan Varga b9fe26de3b 2005-03-10 Zoltan Varga <[email protected]>
* Thread.cs: Make slothash a ThreadStatic field. Fixes #65414.

svn path=/trunk/mcs/; revision=41651
2005-03-10 16:23:50 +00:00
Paolo Molaro 47ea5846d5 Tue Feb 15 18:19:11 CET 2005 Paolo Molaro <[email protected]>
* Thread.cs: make the slothash a field in MonoThread.


svn path=/trunk/mcs/; revision=40706
2005-02-15 17:03:17 +00:00
Sebastien Pouliot 83fb9ee0dc 2005-01-27 Sebastien Pouliot <[email protected]>
* Overlapped.cs: Added check for ControlPolicy and ControlEvidence for
	Unsafe pack. Added MonoTODO for missing security stack propagation.
	* Thread.cs: Add security checks for ControlThread.
	* ThreadPool.cs: Added declarative security checks.


svn path=/trunk/mcs/; revision=39656
2005-01-27 18:15:44 +00:00
Miguel de Icaza a1e6e64402 Must not throw
svn path=/trunk/mcs/; revision=39094
2005-01-18 15:11:20 +00:00
Paolo Molaro 59bea4b831 Thu Jan 13 18:15:32 CET 2005 Paolo Molaro <[email protected]>
* Thread.cs: implement stacksize and parameterized
	start functionality (requires matching runtime).


svn path=/trunk/mcs/; revision=38882
2005-01-13 17:09:11 +00:00
Sebastien Pouliot c71dad3b2f 2004-12-20 Sebastien Pouliot <[email protected]>
* CompressedStack.cs: Implemented most todo so it's usable for CAS.
	* CompressedStackSwitcher.cs: Implemented most todo.
	* Thread.cs: Implement support for getting/setting CompressedStack.


svn path=/trunk/mcs/; revision=37974
2004-12-20 15:29:02 +00:00
Ben Maurer 2b4b651057 some warning silence
svn path=/trunk/mcs/; revision=37938
2004-12-19 18:21:41 +00:00
Zoltan Varga 17a9b88c82 2004-12-15 Zoltan Varga <[email protected]>
* Thread.cs: Change type of culture_info and ui_culture_info to 
	IntPtr. Implement correct culture handling for the UI culture as
	well.

svn path=/trunk/mcs/; revision=37808
2004-12-15 21:00:48 +00:00
Gonzalo Paniagua Javier fdb5a5c6f1 this never happened. Forget it.
svn path=/trunk/mcs/; revision=37784
2004-12-15 14:22:05 +00:00
Gonzalo Paniagua Javier b4d8bb72e5 2004-12-15 Gonzalo Paniagua Javier <[email protected]>
* Thread.cs: don't bother serializing if the CultureInfo we're setting
	has the same LCID as the CurrentCulture.


svn path=/trunk/mcs/; revision=37781
2004-12-15 13:11:33 +00:00
Zoltan Varga f54f60ad51 2004-12-14 Zoltan Varga <[email protected]>
* Thread.cs: Optimize CurrentCulture to avoid initializing the
	serialization infrastructure in the common case when the culture is
	not set explicitly.

svn path=/trunk/mcs/; revision=37747
2004-12-14 13:46:26 +00:00
Zoltan Varga 626977b30a 2004-12-06 Zoltan Varga <[email protected]>
* Thread.cs: Add new fields 'serialized_culture_info{_len}'.
	
	* Thread.cs (CurrentCulture): Fix leaking of culture info objects 
	across appdomains. Partially fixes #50049.

svn path=/trunk/mcs/; revision=37201
2004-12-06 17:21:36 +00:00
Sebastien Pouliot 610037a3ca 2004-09-04 Sebastien Pouliot <[email protected]>
* Thread.cs: Changed an imperative security demand to declarative
	(unsupported) so it doesn't (for now) call the security runtime.

svn path=/trunk/mcs/; revision=33355
2004-09-04 23:18:56 +00:00
Sebastien Pouliot 5e8b8d82af 2004-08-20 Sebastien Pouliot <[email protected]>
* Thread.cs: Added Fx 2.0 properties/methods/attributes.

svn path=/trunk/mcs/; revision=32588
2004-08-20 18:19:00 +00:00
Dick Porter 23c64685e5 Revert this part, it broke things.
svn path=/trunk/mcs/; revision=31188
2004-07-15 17:23:30 +00:00
Dick Porter f614b228dc 2004-07-15 Dick Porter <[email protected]>
* Thread.cs: Hold a lock in GetNamedDataSlot.  Fixes bug 61582,
	based on patch by S�bastien Robitaille
	([email protected]).  Also fix instances of
	lock(typeof(Thread)) to lock a private object instead.

svn path=/trunk/mcs/; revision=31181
2004-07-15 14:28:40 +00:00
Gert Driesen 2eec8e2a38 * Thread.cs: changed return type of VolatileRead to UIntPtr
* ThreadPool.cs: set return type of SetMinThreads to bool

svn path=/trunk/mcs/; revision=29622
2004-06-15 17:55:07 +00:00
Lluis Sanchez 1ac40a0de2 * Thread.cs: Added new fields to keep sync with MonoThread.
Removed state changes in Sleep and Join. The state change is now done
	  in the icall. For accessing to internal fields lock with synch_lock
	  instead of this, which can be a source of deadlocks.

svn path=/trunk/mcs/; revision=29605
2004-06-15 15:56:24 +00:00
Miguel de Icaza d6d643c4fb Remove FIXMEs: they are flagged as TODOs
svn path=/trunk/mcs/; revision=29369
2004-06-11 18:40:10 +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
Gonzalo Paniagua Javier 50abbf1102 2004-06-11 Gonzalo Paniagua Javier <[email protected]>
* Thread.cs:
	(CurrentPrincipal): lock on CurrentThread, not typeof (Thread) and set
	the thread IPrincipal if we get it from the AppDomain.

svn path=/trunk/mcs/; revision=29247
2004-06-11 01:18:21 +00:00
Lluis Sanchez 49228e033d * Thread.cs: Some fixes in Abort. Implemented Suspend and Resume.
Added internal interruption_requested field.

svn path=/trunk/mcs/; revision=27775
2004-05-20 20:02:44 +00:00
Sebastien Pouliot 29ddfa3b81 2004-05-13 Sebastien Pouliot <[email protected]>
* Thread.cs: Added missing MemoryBarrier (only for 1.1) and SpinWait to please
	corcompare. Both throw a NotImplementedException.
	* ThreadPool.cs: Added missing UnsafeRegisterWaitForSingleObject methods (4
	overloads) to please corcompare. All throw a NotImplementedException.

svn path=/trunk/mcs/; revision=27293
2004-05-13 17:47:00 +00:00
Jackson Harper a0c6e79318 * Thread.cs: Use new culture info method for constructing the
current culture.

svn path=/trunk/mcs/; revision=25181
2004-04-07 18:58:44 +00:00
Zoltan Varga b28795d5dc 2004-02-09 Zoltan Varga <[email protected]>
* Thread.cs: Add fields added to unmanaged MonoThread here as well.
	Fixes random errors caused by memory corruption.

svn path=/trunk/mcs/; revision=22906
2004-02-09 18:33:36 +00:00
Zoltan Varga 4afdba1d61 2004-02-06 Zoltan Varga <[email protected]>
* Thread.cs: Store the thread name in unmanaged memory, since the
	thread object is shared between appdomains.

svn path=/trunk/mcs/; revision=22825
2004-02-06 11:08:14 +00:00
Sebastien Pouliot c17dffeb98 2004-02-05 Sebastien Pouliot <[email protected]>
* Thread.cs: Implemented CurrentPrincipal.

svn path=/trunk/mcs/; revision=22815
2004-02-05 23:44:23 +00:00
Gonzalo Paniagua Javier ef60f0ecd6 2004-01-22 Gonzalo Paniagua Javier <[email protected]>
* Thread.cs: delayed thread creation until Start is called. If we
	don't do that and Start() is not called, the thread is leaked. First
	step towards fixing bug #53078.

svn path=/trunk/mcs/; revision=22377
2004-01-22 03:29:37 +00:00
Dick Porter 9278c488f9 This needs to be thread-safe. Spotted by Gonzalo.
svn path=/trunk/mcs/; revision=20692
2003-12-02 13:56:37 +00:00
Dick Porter 793d2afe20 2003-12-02 Dick Porter <[email protected]>
* Thread.cs: Throw InvalidOperationException if Thread.Name is
	already set.

svn path=/trunk/mcs/; revision=20691
2003-12-02 13:04:54 +00:00
Dick Porter c72b1a0824 2003-12-01 Dick Porter <[email protected]>
* String.cs: Make Compare, IndexOf, LastIndexOf, StartsWith,
	Replace, ToLower, ToUpper and Equals use the correct CultureInfo.

2003-12-01  Dick Porter  <[email protected]>

	* CultureInfo.cs: Culture name creation is case-insensitive.
	Implemented CurrentCulture and CurrentUICulture.

	* CompareInfo.cs: Fix IndexOf and LastIndexOf so that they work
	for combining characters.

2003-12-01  Dick Porter  <[email protected]>

	* Thread.cs: Implement CurrentCulture and CurrentUICulture

2003-12-01  Dick Porter  <[email protected]>

	* CaseInsensitiveComparer.cs: Construct the default comparers when
	they're needed, to avoid a dependency loop with CultureInfo's
	constructor.

svn path=/trunk/mcs/; revision=20663
2003-12-01 12:04:49 +00:00
Miguel de Icaza 4b1d5100d5 2003-11-12 Miguel de Icaza <[email protected]>
* Thread.cs: Add new VolatileRead/VolatileWrite methods from 1.1

svn path=/trunk/mcs/; revision=19899
2003-11-12 17:22:53 +00:00
Lluis Sanchez ff0fa8bc92 * Thread.cs: Added ResetDataStoreStatus and RestoreDataStoreStatus
methods. They are used in CrossAppDomainChannel to save and restore
	  thread's local data when switching between domains.

svn path=/trunk/mcs/; revision=19336
2003-10-23 11:33:19 +00:00
Gonzalo Paniagua Javier 2a4ac1b41b 2003-10-08 Gonzalo Paniagua Javier <[email protected]>
* ManualResetEvent.cs: added check for disposed.
	* Thread.cs: no need to init this field.

svn path=/trunk/mcs/; revision=18762
2003-10-08 18:26:49 +00:00
Zoltan Varga ff37ba0c98 2003-10-01 Zoltan Varga <[email protected]>
* Thread.cs: Add locking to AllocateNamedDataSlot and
	FreeNamedDataSlot.

svn path=/trunk/mcs/; revision=18487
2003-10-01 20:24:18 +00:00
Paolo Molaro ec3fa23e77 Wed Aug 20 12:01:36 CEST 2003 Paolo Molaro <[email protected]>
* Thread.cs: put all the fields at the start and add
	more fields needed by the runtime.

svn path=/trunk/mcs/; revision=17436
2003-08-20 10:11:51 +00:00
Lluis Sanchez 7cc9cadfc7 * Thread.cs: SetData() method: use Hashtable.Contains to check
if a dataslot has been allocated (value could be null).

svn path=/trunk/mcs/; revision=17344
2003-08-14 22:40:55 +00:00
Dick Porter b52160b820 2003-07-01 Dick Porter <[email protected]>
* Thread.cs: Throw an exception if thread creation failed.
	(Better than just blowing up later.)

svn path=/trunk/mcs/; revision=15823
2003-07-01 19:17:24 +00:00
Paolo Molaro 52aa31c42b Tue May 13 15:34:29 CEST 2003 Paolo Molaro <[email protected]>
* Thread.cs: added missing field used by the runtime and
	a new field to support thread-static data.

svn path=/trunk/mcs/; revision=14533
2003-05-13 13:48:08 +00:00
Dick Porter 279b670078 2003-04-09 Dick Porter <[email protected]>
* Thread.cs: Make sure a reference to the ThreadStart delegate is
	held.  There's no telling how long it will be before
	Thread.Start() is called, and GC might destroy the delegate.
	Thread() and Start() need to be rewritten so that the runtime
	creates the new thread when Start() is called, which will simplify
	the code a great deal.

svn path=/trunk/mcs/; revision=13442
2003-04-09 14:26:26 +00:00
Miguel de Icaza 62012c26d0 2003-04-05 Miguel de Icaza <[email protected]>
* Console.cs: Make stderr, stdout and stdin use synchronized
	versions of the their readers/writers.

2003-03-20  Miguel de Icaza  <[email protected]>

	* Thread.cs (CurrentCuluture): use the invaraint culture instead
	of "" for the current_culture setting.

2003-04-05  Miguel de Icaza  <[email protected]>

	* TextWriter.cs: Implemented Synchronized method.

	* TextReader.cs: Implemented Synchronized method.

svn path=/trunk/mcs/; revision=13203
2003-04-05 19:00:53 +00:00