Commit graph

146 commits

Author SHA1 Message Date
rfm
df44085cad thread fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31209 72102866-910b-0410-8b05-ffd578937521
2010-08-30 17:27:11 +00:00
theraven
0d8f26e852 Fix build with libobjc2.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30967 72102866-910b-0410-8b05-ffd578937521
2010-07-15 09:59:01 +00:00
theraven
a220e13b83 Correct conditional macro.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30592 72102866-910b-0410-8b05-ffd578937521
2010-06-07 00:27:21 +00:00
theraven
5ecda2b311 Don't bother trying to register a thread creation callback with libobjc2 - it's never used.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30561 72102866-910b-0410-8b05-ffd578937521
2010-06-03 17:35:45 +00:00
rfm
adc93a3a78 thread unregistering fixup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30174 72102866-910b-0410-8b05-ffd578937521
2010-04-16 18:18:43 +00:00
rfm
1a5d643771 generalize define from __MINGW32__ to __MINGW__
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30001 72102866-910b-0410-8b05-ffd578937521
2010-03-19 12:10:11 +00:00
rfm
46fb261443 apply fix by Roland Schwingel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29879 72102866-910b-0410-8b05-ffd578937521
2010-03-08 12:36:37 +00:00
rfm
7ff4d4c9c7 fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:49:31 +00:00
rfm
d605c6f7b5 Simplify header inclusion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29669 72102866-910b-0410-8b05-ffd578937521
2010-02-19 08:12:46 +00:00
rfm
9edbe1a4fc cosmetic tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29657 72102866-910b-0410-8b05-ffd578937521
2010-02-17 11:47:06 +00:00
rfm
f13d56d8ec merge back reorganisation branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
2010-02-14 10:48:10 +00:00
rfm
845bfe3c4c don't try to cleanup on main thread exit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29478 72102866-910b-0410-8b05-ffd578937521
2010-02-04 18:04:13 +00:00
rfm
b20bb71ccc use usleep for small intervals
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29469 72102866-910b-0410-8b05-ffd578937521
2010-02-03 09:45:45 +00:00
rfm
612ed04160 windows tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29468 72102866-910b-0410-8b05-ffd578937521
2010-02-03 09:31:59 +00:00
rfm
59114c78f1 exit when main thread exits
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29462 72102866-910b-0410-8b05-ffd578937521
2010-02-02 14:25:58 +00:00
rfm
56f4c389a0 thread termination fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29461 72102866-910b-0410-8b05-ffd578937521
2010-02-01 21:08:45 +00:00
rfm
6bf3a906e9 cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28787 72102866-910b-0410-8b05-ffd578937521
2009-10-10 08:16:17 +00:00
rfm
b6159c95bc fixup to work with old compilers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28750 72102866-910b-0410-8b05-ffd578937521
2009-09-27 19:31:31 +00:00
rfm
1ed217861f minor simplification
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28645 72102866-910b-0410-8b05-ffd578937521
2009-09-09 08:21:51 +00:00
rfm
4cc5cae469 thread exit improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28638 72102866-910b-0410-8b05-ffd578937521
2009-09-08 20:32:52 +00:00
rfm
3263c76ab3 Yield if asked to sleep
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28636 72102866-910b-0410-8b05-ffd578937521
2009-09-08 17:56:58 +00:00
theraven
271a54ece9 Moved registration of runtime multithreaded handler to after the creation of the main thread's NSThread object. This fixes a potential issue where the runtime is already in multithreaded mode, calls the handler, and NSException crashes dereferencing the thread object.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28609 72102866-910b-0410-8b05-ffd578937521
2009-09-05 17:28:01 +00:00
theraven
9dfadd809e * Source/NSLock.m
* Headers/Foundation/NSLock.h
	Completely rewritten implementations of NSLock.h classes.  These are now
	faster, more complete, OS X-compatible, and most importantly actually
	work.  The old ones, for example, called functions that were not
	implemented on Windows.  
	* Source/NSThread.m
	Call pthread functions directly in NSThread instead of via the libobjc
	abstraction layer.  Also fixed a few issues, such as GC not being
	initialized properly for NSThread subclasses that override -main (Javaism
	supported by OS X) and tidies up the code in several places, removing
	premature optimizations, especially those that introduce a test for an
	unlikely case at the start of a method and thus slow everything down.

	As a result of this change, GNUstep now depends on an implementation of
	POSIX threads.  This is included as standard on all modern UNIX systems,
	and as an option on less-modern UNIX systems and non-UNIX systems,
	including Windows.  If you are building GNUstep on Windows, please install
	the pthreads-win32 package, available from:

	http://sourceware.org/pthreads-win32/

	PLEASE TEST THIS!  There may be some code that depended on the old
	behaviour.  I have been running the new NSLock implementation on FreeBSD
	for a few weeks without issue; please report to me any problems that you
	have on your platform.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28598 72102866-910b-0410-8b05-ffd578937521
2009-09-02 13:03:13 +00:00
rfm
cc3838db4d Fix race condition
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28298 72102866-910b-0410-8b05-ffd578937521
2009-05-24 04:22:09 +00:00
rfm
30cf8bf35b Updates for 10.5 API changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27962 72102866-910b-0410-8b05-ffd578937521
2009-02-23 20:42:32 +00:00
rfm
afb6e09fe8 fix bugs #25545 and #25546
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27832 72102866-910b-0410-8b05-ffd578937521
2009-02-10 14:35:12 +00:00
rfm
fed6864e9d Attempt to fix thread registration for GC (bug #25541)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27829 72102866-910b-0410-8b05-ffd578937521
2009-02-10 12:16:40 +00:00
rfm
0913c7cb95 More garbage collection updates/fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27590 72102866-910b-0410-8b05-ffd578937521
2009-01-13 15:57:38 +00:00
rfm
d304d9ee34 garbage collection fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27578 72102866-910b-0410-8b05-ffd578937521
2009-01-12 12:48:46 +00:00
rfm
132c0a285d Make this a bit more robust
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26864 72102866-910b-0410-8b05-ffd578937521
2008-09-23 08:10:59 +00:00
rfm
ad21368ee2 try to make tread performer firing more robust
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26856 72102866-910b-0410-8b05-ffd578937521
2008-09-18 08:22:53 +00:00
rfm
e0711a3b8d allow developers more time to adapt to LGPLv3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26606 72102866-910b-0410-8b05-ffd578937521
2008-06-08 10:38:33 +00:00
rfm
e1eae14cff Close pipes on invalidation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26341 72102866-910b-0410-8b05-ffd578937521
2008-03-18 05:55:32 +00:00
rfm
b6638d05aa More thread changes for MacOS-X compatibility
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26340 72102866-910b-0410-8b05-ffd578937521
2008-03-18 05:45:05 +00:00
rfm
7c710cfbcb Complete update of NSThread for MacOS-X 10.5 compatibility. Needs testing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26332 72102866-910b-0410-8b05-ffd578937521
2008-03-17 15:23:11 +00:00
rfm
7303f4b2ab Fix typo in comment
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26041 72102866-910b-0410-8b05-ffd578937521
2008-02-08 13:35:50 +00:00
rfm
cf3dc3ab92 Clarify thread detach error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25880 72102866-910b-0410-8b05-ffd578937521
2008-01-06 08:56:59 +00:00
rfm
656258dd5c Implement stack size limit. Add workaround for versions of libobjc which
leak thread memory.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25790 72102866-910b-0410-8b05-ffd578937521
2007-12-27 07:02:27 +00:00
rfm
8659f6c5ad destroy graphics context on thread exit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25787 72102866-910b-0410-8b05-ffd578937521
2007-12-25 20:31:24 +00:00
rfm
0c0a960f2f Improve error message on thread creation failure
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25784 72102866-910b-0410-8b05-ffd578937521
2007-12-25 14:13:18 +00:00
rfm
baad4c8922 improve debug/error logging a little.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25780 72102866-910b-0410-8b05-ffd578937521
2007-12-24 20:51:19 +00:00
rfm
52f2105eb1 Fix memory leak.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25779 72102866-910b-0410-8b05-ffd578937521
2007-12-24 17:31:52 +00:00
rfm
a0b3607dd6 Improved stacktrace/debug handling.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25667 72102866-910b-0410-8b05-ffd578937521
2007-12-03 14:13:57 +00:00
rfm
15ffb48291 NSThread updates and cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25608 72102866-910b-0410-8b05-ffd578937521
2007-11-25 14:49:05 +00:00
rfm
ef82327d8e Implement part of MacOS 10.5 additions for NSThread.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25607 72102866-910b-0410-8b05-ffd578937521
2007-11-25 14:25:26 +00:00
rfm
cd46236028 Update to GPL3 and LGPL3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25482 72102866-910b-0410-8b05-ffd578937521
2007-09-14 11:36:11 +00:00
rfm
38c0c4a580 Header tidyups, particularly updating of version compatibility macros.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24000 72102866-910b-0410-8b05-ffd578937521
2006-10-31 07:05:46 +00:00
rfm
9e7b96ab0e More code tidyups and NSError updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23921 72102866-910b-0410-8b05-ffd578937521
2006-10-20 10:56:27 +00:00
rfm
31342aef09 Updates to reduce global namespace pollution. Plenty more remaining.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23795 72102866-910b-0410-8b05-ffd578937521
2006-10-09 14:00:01 +00:00
rfm
e7962cfb4d avoid spurious compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23027 72102866-910b-0410-8b05-ffd578937521
2006-06-04 06:42:10 +00:00