Commit Graph

14 Commits

Author SHA1 Message Date
Károly Balogh
bda626d450 amicommon: add some naive RTLEventWaitFor implementation, add long standing tthread.inc patch by Sven. Synchronize/CheckSynchronize should now work on Amiga
git-svn-id: trunk@41584 -
2019-03-04 01:43:42 +00:00
Károly Balogh
c840c4d6a8 athreads: add a custom API to retrieve underlying process ID from AThreads. this makes it possible to combine some Amiga API features like Signaling with FPC's thread handling
git-svn-id: trunk@38848 -
2018-04-26 11:28:38 +00:00
marcus
a0aaa69c0f Amicommon: implemented BasicEvents in AThreads
git-svn-id: trunk@36905 -
2017-08-14 19:52:16 +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
Károly Balogh
57f8922448 amicommon: make AThreads call the thread init/exit chain
git-svn-id: trunk@30992 -
2015-06-06 19:52:13 +00:00
Károly Balogh
0abb517ffb amicommon: AThreads now supports calling suspend from the thread itself
git-svn-id: trunk@30959 -
2015-05-31 17:26:45 +00:00
Károly Balogh
0997122c4c AThreads: less random Hungarian swearing as accidentally left in debug code :)
git-svn-id: trunk@30942 -
2015-05-31 10:06:36 +00:00
Károly Balogh
eacc41d3b3 AThreads: use ThreadInfo block pointer as ThreadID, instead of the ProcessPtr itself, because after the process exited that can be reused and leads to ID collisions in the list. Also added a small helper for Int to HexStr printing, so we could avoid a bunch of pointer casting all over the code.
git-svn-id: trunk@30940 -
2015-05-31 09:09:51 +00:00
Károly Balogh
24677c9309 amicommon: more work on AThreads
- reworked exit syncronization/waiting. now uses signalsemaphores instead of messaging. this avoids the requirement for an extra message port per thread, which caused signal shortages earlier.
- additional cleanups
- now try to free up "leaked" resources on exit

git-svn-id: trunk@30933 -
2015-05-29 02:07:37 +00:00
Károly Balogh
b4ce380cd4 amicommon/AThreads: use shared semaphores locks where possible for read-only access; preparations to be built in the RTL; code cleanups
git-svn-id: trunk@30924 -
2015-05-28 01:10:38 +00:00
Károly Balogh
21a9b96e7e amicommon: avoid SysUtils unit and AnsiStrings in AThreads
git-svn-id: trunk@30922 -
2015-05-27 22:37:50 +00:00
Károly Balogh
45ce4538fa amicommon: more AThreads work
- in WaitForThreadTerminate, do not try to wait if the thread already exited
- when debug mode enabled, release the threadvars later, so AnsiString debug messages still work
- do not call DoneThread in EndThread. the threadfunc will call it when exited.

git-svn-id: trunk@30913 -
2015-05-25 19:47:21 +00:00
Károly Balogh
73f451f3d3 amicommon: AThreads improvements
- now supports creation of suspended threads
- reworked CriticalSections handling to avoid outside-heap dynamic allocations of mutex space
- allocate threadvars area into the heapPool, this avoids leaking the mainthread threadvar area on exit
- now supports setting thread stacksize in a Delphi-compatible way (by default inherits the stacksize of its parent)
- better subthread naming

git-svn-id: trunk@30912 -
2015-05-25 17:55:43 +00:00
Károly Balogh
c7856d25f8 amicommon: AThreads, a native threadmanager unit, similar to Unix's cthreads
- early stage, but tested and works on MorphOS and Amiga/68k (with at least 1 subthread... :)
- basic Threading functions and CriticalSections implemented
- Semaphores, RTLEvents and some other minor bits are still missing
- probably won't support all kinds of crazy hacky code out there. the user code must obey some Amiga-limitations, which come from the way the Amiga works

git-svn-id: trunk@30905 -
2015-05-24 23:07:41 +00:00