Commit Graph

108 Commits

Author SHA1 Message Date
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
marcoonthegit
452ec93f06 * implement waitformultiple for win32 only.
* Change interface to allow for COM waiting + a basic windows implementation. (only for desktop apps? Use msgwait* for the rest?)
2023-05-20 14:37:26 +02:00
Jinyang He
92e60d2107 add loongarch64 linux rtl support 2023-02-05 19:18:48 +00:00
svenbarth
d0b1402e10 * fix for Mantis #37252: apply patch by Bi0T1N to implement TThread.NameThreadForDebugging for Mac OS X 10.6 and newer (older versions don't provide the required functions)
git-svn-id: trunk@49323 -
2021-05-02 12:46:39 +00:00
florian
b7fe338bbe * mips and xtensa compilation fixed
git-svn-id: trunk@48928 -
2021-03-09 21:07:51 +00:00
florian
bb97c5ab69 + RiscV: set threadvarblocksize
* sanity check if threadvarblocksize is really set

git-svn-id: trunk@48925 -
2021-03-08 22:07:07 +00:00
ondrej
c64429cdd0 * lazy thread initialization support
git-svn-id: trunk@47308 -
2020-11-04 14:55:40 +00:00
svenbarth
73026618c8 * protect against empty strings inside the SetThreadDebugNameA and -U functions
git-svn-id: trunk@45237 -
2020-05-03 21:11:36 +00:00
svenbarth
0906714aa4 * fix for Mantis #36950: apply (slightly adjusted) patch by Bi0T1N to implement SetThreadDebugNameA and -U for Linux and Android targets
git-svn-id: trunk@45233 -
2020-05-03 15:08:35 +00:00
svenbarth
c8b7094378 * fix for Mantis #36940: apply (adjusted) patch by Bi0T1N to add functionality to the thread manager to set a thread's debug name (if supported by the platform)
git-svn-id: trunk@45160 -
2020-04-28 19:58:20 +00:00
florian
3edc0560b0 * patch by Benjamin Rosseaux: TEvent.WaitFor on *nix uses Monotonic Clock now
git-svn-id: trunk@43589 -
2019-11-25 20:58:18 +00:00
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