hmelder
538f0ed023
NSThread: Add warning when truncating thread name
2024-09-02 14:51:59 +02:00
Hugo Melder
162708f7ed
NSThread: Fix threadPriority
and setThreadPriority:
on Android by using setpriority
instead of pthread ( #436 )
...
* Update Changelog
* Use {get, set}priority for -[NSThread setThreadPriority] on Android
2024-08-13 19:59:56 +02:00
rfm
4233f6a9d6
fix dead assignments
2024-06-21 15:02:55 +01:00
rfm
241e2a47ca
locking updates (fine grained locking rather than global lock)
2024-05-30 10:40:52 +01:00
hmelder
10eaba4f13
Fix dummy function signature
2024-04-28 23:22:20 +02:00
hmelder
8ec158ad05
Guard Windows Header Include
2024-04-28 23:22:20 +02:00
hmelder
8a93628ecb
NSThread: Fix behaviour and Implement setName on Win32
2024-04-28 23:22:20 +02:00
Riccardo Mottola
08858caf29
cleanup biolerplate comments, enable autogsdoc comments, cleanup some old RCS/CVS tags, fix emails
2023-12-23 02:44:50 +01:00
Frederik Seiffert
35ef9423e0
Annotate callback functions with __stdcall on Windows
...
Fixes crash on exit on Windows x86.
2021-08-08 17:27:40 +02:00
Frederik Seiffert
cf2dae1e21
Improve NSThread thread priority error handling
...
Now using sched_get_priority_min/max instead of PTHREAD_MIN/MAX_PRIORITY defines, and prevent error log when min/max priority are equal (e.g. 0), which happens e.g. on Android when thread priorities are not settable.
2021-07-29 14:22:27 +02:00
Frederik Seiffert
abfe4e2a04
Use native threading and locking APIs on Windows
...
Removes dependency on pthread library and uses fast Slim Reader/Writer (SRW) locks for NSLock/NSRecursiveLock/NSCondition/NSConditionLock as well as all internal locks. Adds GS_MUTEX_*() macros in GSPThread.h, that are being used for all internal locking instead of pthread APIs.
Also adds support for thread priorities on Windows, fixes method signature of +[NSThread setThreadPriority:] to match Apple platforms, and adds error handling in same method.
2021-07-29 14:22:27 +02:00
Frederik Seiffert
a7e87824c0
Fix possible deadlock when becoming multi-threaded.
2020-07-06 22:01:01 +02:00
Richard Frith-Macdonald
6fd8dd7a20
Wrap code for posting of notifications (for becoming multithreaded and for a thread being about to exit) in an autorelease loop. This should avoid possible leakage of objects and warnings during the notification process.
2020-05-29 16:25:52 +01:00
Richard Frith-Macdonald
fab98ede73
On thread exit we must post the notification that it *will* exit before
...
setting the instance variable to say that it has finished. This is tested
as the order OSX does it, and makes sense to ensure that, when -isFinished
returns YES we can be sure the thread will not do anything else.
2020-05-26 16:30:15 +01:00
Frederik Seiffert
a3b8ea0937
Use pthread_setname_np result instead of errno.
...
Fixes setting thread name on platforms where errno is not set.
2020-03-17 14:49:02 +01:00
Gregory John Casamento
753c907938
Fix address for FSF and License name in all headers in base
2019-12-09 18:36:00 -05:00
Richard Frith-Macdonald
d497c7b3ea
improve debug output
2019-08-09 11:06:17 +01:00
Frederik Seiffert
3a97bb08f4
Added basic spinlock implementation using builtins.
...
This will be used on platforms without pthread_spin_lock(), e.g. Android targeting API level < 24.
Implementation lifted from spinlock.h in libobjc2.
2019-05-07 17:40:41 +02:00
Richard Frith-Macdonald
6f3bd6ac97
Expose GNU TLS wrappers and add methods to get certificate expiry
2019-01-16 09:56:08 +00:00
Riccardo Mottola
16ef46642b
fix obvious DEBUG inversion, spit out warning on stderr
2018-08-07 16:50:33 +02:00
Riccardo Mottola
d852847893
minor tweak in debug for dummy functions that caused crash on Solaris
2018-08-07 13:01:45 +02:00
Riccardo Mottola
62511eeca2
fix missing parenthesis
2018-05-30 00:40:34 +02:00
Ivan Vučica
0e6865a3fd
Fix typo in code branch for platforms without pthread_spin_lock().
...
Check for value of HAVE_PTHREAD_SPIN_LOCK instead of whether the
macro is defined.
2018-05-20 12:40:24 +01:00
Richard Frith-Macdonald
5c7713cacc
Minor tidyups plus config update
2018-04-24 12:24:37 +01:00
Riccardo Mottola
6f7e480913
Detect if platform is missing spin locks and provide an dummy implementation. Emit warning during compilation and runtime (in debug)
2018-04-23 20:37:28 +02:00
Richard Frith-Macdonald
635b71e442
initialise before use
2018-04-16 13:18:36 +01:00
Richard Frith-Macdonald
6c3d99ea3f
fix method name error
2018-04-10 14:29:57 +01:00
Richard Frith-Macdonald
cc410b6bbc
Fix for recursive thread registration on one platform.
2018-04-10 09:19:50 +01:00
Gregory Casamento
ced3b27144
Correct minor mispelling of NSLog. Compilation error.
2018-04-04 18:48:41 -04:00
Richard Frith-Macdonald
cc7a146796
More changes to make lock tracking more robust
2018-04-04 14:42:20 +01:00
Richard Frith-Macdonald
603c3b1103
indicate trace by use of subclass rather than flag
2018-04-04 12:58:06 +01:00
Richard Frith-Macdonald
c1f96a1cf4
Simplify locking for time zones
2018-03-27 10:37:53 +01:00
Richard Frith-Macdonald
d6612ef880
Fixes in experimental code
2018-03-27 09:55:29 +01:00
Richard Frith-Macdonald
ebfe915619
Fixups for stack handling
2018-03-27 07:06:17 +01:00
Richard Frith-Macdonald
75bf489aec
Allow for waiting on a mutex we already own
2018-03-26 16:05:18 +01:00
Richard Frith-Macdonald
05439fe15d
Experimental deadlock detection code
2018-03-26 15:20:48 +01:00
Richard Frith-Macdonald
28048a5947
Don't try to notify about task termination on the thread that started the task
...
if it has already finished executing.
2018-01-15 11:42:04 +00:00
Richard Frith-Macdonald
7fd95c877f
Improve message in exception when we perform on a finished thread
2018-01-15 10:08:13 +00:00
Richard Frith-Macdonald
8bd7c048ac
Improve handling of messaging to blocked thread
2017-09-06 09:32:07 +01:00
Richard Frith-MacDonald
27899e4d66
patch by Larry Campbell plus removal of some garbage collection vestiges
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40008 72102866-910b-0410-8b05-ffd578937521
2016-07-18 10:50:28 +00:00
Richard Frith-MacDonald
fda234553c
windows fixup for pthread exit with null pointer
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39935 72102866-910b-0410-8b05-ffd578937521
2016-06-27 20:21:11 +00:00
Richard Frith-MacDonald
ecfbd24d8e
Changed to restructure subdirectory layout for binaries and system dependent
...
resources in a non-flattened installation. First step towards seamless
Debian multiarch support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39918 72102866-910b-0410-8b05-ffd578937521
2016-06-25 07:12:41 +00:00
Richard Frith-MacDonald
71941dd24d
cleanup changes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39762 72102866-910b-0410-8b05-ffd578937521
2016-05-14 09:34:01 +00:00
Richard Frith-MacDonald
dcec9dd0ab
fgix for problem spotted by Wolfgang
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39753 72102866-910b-0410-8b05-ffd578937521
2016-05-13 13:19:22 +00:00
Richard Frith-MacDonald
2d99b4b95d
avoid compiler warnings and stasndardise a few declarations
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39672 72102866-910b-0410-8b05-ffd578937521
2016-04-17 15:07:38 +00:00
Richard Frith-MacDonald
d40d219015
removal of garbage collection
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39608 72102866-910b-0410-8b05-ffd578937521
2016-03-25 11:15:28 +00:00
Richard Frith-MacDonald
62d2bcbabc
changes for use of _WIN32 define on windows
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00
Richard Frith-MacDonald
1d46f1a656
fixup for late unregister on windows
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39467 72102866-910b-0410-8b05-ffd578937521
2016-03-05 19:09:11 +00:00
Richard Frith-MacDonald
0306683e63
iCreate mapt able lazily
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39382 72102866-910b-0410-8b05-ffd578937521
2016-02-16 22:28:34 +00:00
Richard Frith-MacDonald
44165e9bcc
Fixup for mistake in earlier commit
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39374 72102866-910b-0410-8b05-ffd578937521
2016-02-15 11:07:44 +00:00