florian
72416edcc4
+ support for tlsm_general on i386-linux
...
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
florian
9c041afc7c
* disable generic threadvar handling if section thread vars are available
...
git-svn-id: trunk@40270 -
2018-11-07 22:03:01 +00:00
Károly Balogh
ab1a82bfb3
fix typo in comment. no functional change.
...
git-svn-id: trunk@37567 -
2017-11-07 15:50:59 +00:00
pierre
0c7646761f
Also disable pthread_attr_setinheritsched call for BeOS
...
git-svn-id: trunk@37266 -
2017-09-20 13:56:05 +00:00
florian
a927181d87
* properly align threadvars for sparc64
...
git-svn-id: trunk@36694 -
2017-07-08 21:22:40 +00:00
florian
1b371b15e3
* make webtbs/tw30535 also working on OSes using cthreads
...
git-svn-id: trunk@35570 -
2017-03-12 09:28:41 +00:00
sergei
67bd4775fd
- Cleaned out thread manager semaphore support which was ever implemented only for Unix, and not used since r28965. This also reverts changes to System unit interface introduced in r27665.
...
git-svn-id: trunk@34542 -
2016-09-20 20:14:36 +00:00
Jonas Maebe
f0c0b00467
* avoid threadvar memory leaks for external hooked threads if the tlskey
...
thread data is finalised by libpthread before the CleanupKey routine
is called (based on patch by Derek, mantis #28806 )
git-svn-id: trunk@32168 -
2015-10-27 21:52:05 +00:00
Jonas Maebe
5a8959381c
+ Darwin/AArch64 support
...
git-svn-id: trunk@29934 -
2015-02-23 22:53:50 +00:00
pierre
1fcc0490fe
Also use PHTREAD_INHERIT_SCHED in pthread_attr_setinheritedsched for NetBSD system
...
git-svn-id: trunk@29055 -
2014-11-10 23:10:27 +00:00
Jonas Maebe
35a313d98c
* throw an error if RTLEventCreate() fails on Unix
...
git-svn-id: trunk@28964 -
2014-11-02 15:00:21 +00:00
michael
7ee72ef5a8
* Init threading when setting C thread manager
...
git-svn-id: trunk@27346 -
2014-03-29 19:31:12 +00:00
marco
996e802606
* fix memleak pthread_attr, Mantis #25416 by Henry Vermaak.
...
git-svn-id: trunk@26220 -
2013-12-11 21:47:02 +00:00
Jonas Maebe
cada770f9e
* changed return value in case of failure in ThreadManager.SemaphoreInit
...
from nil to pointer(-1), because nil/0 is a valid return value for
sem_open() on some platforms
git-svn-id: trunk@26079 -
2013-11-13 16:51:11 +00:00
yury
d26f0552a0
* Sync with trunk r23404.
...
* Regenerated makefiles.
git-svn-id: branches/targetandroid@23405 -
2013-01-16 13:21:51 +00:00
Jonas Maebe
d3d0df6e4d
* terminate with an error when initializing a critical section and recursive
...
mutexes are not available, since one of the expected properties of
(Delphi/Windows-compatible) critical sections is that they ar
re-entrant (mantis #23334 )
git-svn-id: trunk@23011 -
2012-11-18 10:23:44 +00:00
Jonas Maebe
676db6d377
* removed stray try/finally statement (mantis #23333 )
...
git-svn-id: trunk@23010 -
2012-11-18 10:23:38 +00:00
tom_at_work
810adb2f65
Merge with trunk r22040. Regenerated makefiles.
...
git-svn-id: branches/targetandroid@22046 -
2012-08-09 08:12:34 +00:00
tom_at_work
bf2a01cfeb
fix pthreads use with Android: it does not provide some functions. This patch is partially based on the bug report 0021525. Further, fix use of sem_timedwait in cthreads.pp since Android supports it.
...
git-svn-id: branches/targetandroid@21066 -
2012-04-26 19:05:06 +00:00
Jonas Maebe
8d8fc0fdee
+ RTL for AIX
...
git-svn-id: trunk@20786 -
2012-04-11 17:59:49 +00:00
Jonas Maebe
cc736fe115
* use same code path for iphonesim as for darwin (should fix mantis #21190 )
...
git-svn-id: trunk@20374 -
2012-02-17 20:28:43 +00:00
Jonas Maebe
bfc1a6ff1c
+ added support for intialising/finalising threads not started via the FPC
...
runtime
git-svn-id: trunk@15557 -
2010-07-12 16:16:50 +00:00
marco
8cce3d3f91
* closethread thread manager field/function. Mantis 13160
...
git-svn-id: trunk@15072 -
2010-03-26 23:31:52 +00:00
Jonas Maebe
4d8f578e4c
* when typecasting the result of pthread_self, always call it using
...
pthread_self(), because it's a procvar under Linux and hence otherwise
the value of the procvar instead of the function result will be
taken (mantis #15821 )
git-svn-id: trunk@15049 -
2010-03-24 21:51:07 +00:00
marco
c477df5046
* TCriticalSection.Tryenter support (Mantis 15928) + short test/demo
...
tested on FreeBSD (general Unix) and Windows. Note that Haiku seems
to have a native threadmgr rather than the Unix one. Will notify
maintainer (Olivier)
git-svn-id: trunk@15026 -
2010-03-21 11:34:05 +00:00
Jonas Maebe
9cd0a2ff1e
* link to libpthread at compile time on Linux to avoid problems on some
...
newer glibc systems when it's only loaded dynamically at run time
git-svn-id: trunk@14970 -
2010-03-04 15:36:35 +00:00
pierre
048b2ba67b
* fix pthread problem wen using nice for solaris
...
git-svn-id: trunk@14823 -
2010-01-28 19:05:42 +00:00
Jonas Maebe
c2190ebd30
* return errors from unimplemented functions instead of random values
...
git-svn-id: trunk@14002 -
2009-11-01 15:41:29 +00:00
Jonas Maebe
b92df02778
* new Intbasicevent*() implementation based on pthread_cond_signal by
...
Fabio Luis Girardi (mantis #9895 )
git-svn-id: trunk@12857 -
2009-03-04 20:15:27 +00:00
Jonas Maebe
9e7efd7321
* reduced waiting steps in emulated "timed wait" in basiceventwaitfor
...
further from 50ms to 20ms (mantis #9895 )
git-svn-id: trunk@12813 -
2009-02-27 21:36:55 +00:00
florian
c127154efa
o Haiku patches by Olivier Coursiere
...
+ add posix thread support
* improve signal handling
* synchronize haiku's baseunix unit with the unix one (maybe it will be possible to remove Haiku's one in a future patch, but i keep it for now)
+ add support for standard sockets
* fix some functions import to use the right libraries under Haiku
* fix packages compilation
git-svn-id: trunk@12636 -
2009-02-01 10:30:55 +00:00
Jonas Maebe
1a1fc1357d
* honour the specified stack size when creating new threads on unix
...
platforms + test (mantis #12942 )
git-svn-id: trunk@12527 -
2009-01-08 18:37:24 +00:00
Jonas Maebe
4f5513466a
* reverted r11671 because it breaks tthread.waitfor on unix
...
git-svn-id: trunk@11731 -
2008-09-08 21:10:38 +00:00
michael
c179162028
* Call EndThread manually if thread function returns (mantis #11490 )
...
git-svn-id: trunk@11671 -
2008-08-30 21:48:39 +00:00
Jonas Maebe
34d0fd2c30
* give generic IntbasiceventWaitFor a granularity of 50 rather than
...
500 miliseconds
git-svn-id: trunk@9222 -
2007-11-12 22:06:39 +00:00
Jonas Maebe
2701a0f743
* initialise timespec.tv_sec again for generic BasicEventWaitFor
...
git-svn-id: trunk@8836 -
2007-10-17 21:14:01 +00:00
micha
5f3e2b10e8
* use sem_timedwait for BasicEventWaitFor if available (linux now)
...
git-svn-id: trunk@8835 -
2007-10-17 20:49:25 +00:00
micha
5d1a952f2a
* fix initial state of basicevent
...
git-svn-id: trunk@8781 -
2007-10-13 20:25:46 +00:00
Jonas Maebe
123362235b
* use initc.fpgetCerrno rather than fpgeterrno to get the errno
...
results of the sem_* routines (since those always come from libc/
libpthread)
git-svn-id: trunk@8266 -
2007-08-12 08:29:48 +00:00
Jonas Maebe
4457538435
* explicitly unmask SIGSEGV, SIGILL, SIGBUS and SIGFPE at the start
...
of a new thread (should fix #9073 )
git-svn-id: trunk@8265 -
2007-08-11 20:59:37 +00:00
Jonas Maebe
ce86cedd4d
* return wrAbandoned rather than wrError from IntbasiceventWaitFor
...
in case a sleep is interrupted while the event is being destroyed
git-svn-id: trunk@8260 -
2007-08-11 08:13:36 +00:00
Jonas Maebe
ef801ba3a3
* check once more whether we can lock after we've waited
...
for the entire timeout in IntbasiceventWaitFor
git-svn-id: trunk@8259 -
2007-08-11 08:07:44 +00:00
Jonas Maebe
494fb81dd8
* fixed semaphore implementation based on file handles (select needs
...
file descriptor + 1 as first parameter, select can also be EIntr)
* changed IntbasiceventWaitFor (used by syncobjs) so it can emulate
timeouts (using a loop and short sleeps) (mantis #9414 )
* also added wrAbandoned support to IntbasiceventWaitFor
* enhanced tbrtlevt.pp to test new functionality
git-svn-id: trunk@8257 -
2007-08-10 20:20:44 +00:00
Jonas Maebe
fd98a0cc5b
* don't call runerror if a unix threading error occurs (because this
...
immediately terminates the whole application), but instead call
handleerrorframe (which can be converted into an exception) (#7954 )
git-svn-id: trunk@8248 -
2007-08-08 13:59:17 +00:00
Jonas Maebe
4dd3be0e5a
* return thread function result via pthread_exit() from CBeginThread
...
(Vinzent Hoefler)
* simplified CWaitForThreadTerminate based on comments from Vinzent
Hoefler
* fixed resource leaks where in some cases a pthread would not be
reaped based on comments from Vinzent Hoefler (resolves #9016 )
git-svn-id: trunk@7588 -
2007-06-06 15:18:48 +00:00
Jonas Maebe
526a79a3c6
* disable thread suspension from another thread under *nix, see added
...
comments in cthreads.pp why
git-svn-id: trunk@7551 -
2007-06-02 11:39:59 +00:00
Jonas Maebe
3ab9ace8c4
* implement CThreadSwitch using sched_yield()
...
git-svn-id: trunk@7429 -
2007-05-23 13:38:20 +00:00
micha
7f2a257102
+ heap manager now per thread, reduce heap lock contention
...
+ heap threading test
git-svn-id: trunk@7407 -
2007-05-20 20:58:12 +00:00
micha
6ec55d2e74
* fix heap mutex deadlock in case of runtime error within heap management (needs recursive heap mutex)
...
git-svn-id: trunk@7337 -
2007-05-14 21:09:16 +00:00
micha
702685717f
* cleanup of rtlevents, remove startwait due to persistance guarantee
...
git-svn-id: trunk@5854 -
2007-01-08 19:11:07 +00:00