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
5eea4b2846
amicommon: support for init/exit procedures for threads. will be used by Sockets unit for example, because bsdsocket.library needs to be reopened for each thread
...
git-svn-id: trunk@30991 -
2015-06-06 19:51:12 +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
6e6b00377f
amicommon: since system units now contain CREATE_SUSPENDED const, use that instead of a hardwired value
...
git-svn-id: trunk@30958 -
2015-05-31 17:25:31 +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
6afcca7cd3
Amiga-likes: preparations for inclusion of AThreads into the RTL buildprocess
...
git-svn-id: trunk@30923 -
2015-05-28 00:47:35 +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
eb692e46d2
amicommon: added ShortString version of SysDebug family of functions
...
git-svn-id: trunk@30921 -
2015-05-27 22:25:22 +00:00
Károly Balogh
632c46bcb6
amicommon: have a generic tthread.inc which even works, given there is a reasonably advanced ThreadManager
...
git-svn-id: trunk@30914 -
2015-05-25 21:06:53 +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
Károly Balogh
f5bcb011ea
amicommon: properly arbitrate access to the open file list in a multithreaded environment
...
git-svn-id: trunk@30899 -
2015-05-24 12:15:02 +00:00
Károly Balogh
48b38994c8
amicommon: the use OS-defined TICKS_PER_SECOND const instead of redefining it using another name
...
git-svn-id: trunk@30391 -
2015-03-30 08:26:16 +00:00
Károly Balogh
99123a1ea9
amicommon: massively improved FindFirst/FindNext implementation in the DOS unit. now supports Directory filtering and returns the time field of SearchRec in the expected format. This fixes a bunch of issues in the IDE and Free Vision, among others
...
git-svn-id: trunk@30390 -
2015-03-30 02:18:36 +00:00
Károly Balogh
6128007f83
amicommon: reindented dos/Create_Timer(), no functional changes
...
git-svn-id: trunk@30364 -
2015-03-29 11:09:37 +00:00
Károly Balogh
d7ffb52490
amicommon: define FPC_FEXPAND_DIRSEP_IS_UPDIR for Amiga-like systems. this seems to fix several FExpand weirdness on these systems (like the IDE not working properly on the root directory of a volume due to wrong paths)
...
git-svn-id: trunk@30358 -
2015-03-29 01:51:04 +00:00
Károly Balogh
bbecfeed9e
Amiga: manually semaphore-protect the heap Pool, because classic Amiga has no MEMF_SEM_PROTECTED
...
git-svn-id: trunk@30356 -
2015-03-29 00:18:19 +00:00
marcus
141878978e
AmiCommon: Missing UnLockDosList, DiskFree Bugfix
...
git-svn-id: trunk@29694 -
2015-02-14 20:06:47 +00:00
Károly Balogh
3cdf2d0e53
AROS: fixed the new do_filesize() code to build on AROS.
...
git-svn-id: trunk@29381 -
2015-01-04 01:55:49 +00:00
Károly Balogh
3d2fca152b
amicommon: a better, faster implementation of do_filesize(). since it no longer seeks, speed should be constant and not depend on the filesize and underlying FS fragmentation, among others
...
git-svn-id: trunk@29379 -
2015-01-04 01:32:37 +00:00
marcus
7c42cb8b0c
Amicommon: Change back WindowPtr in DiskSize/DiskFree
...
git-svn-id: trunk@29299 -
2014-12-14 22:38:05 +00:00
marcus
9c635671ce
amicommon: DiskSize/DiskFree implemented with some helper functions
...
git-svn-id: trunk@29297 -
2014-12-14 21:33:28 +00:00
marcus
96ac520e73
AmiCommon: DiskFree/DiskSize for >2GB
...
AROS: fast BPTR Pointer (ABIv0)
git-svn-id: trunk@29222 -
2014-12-08 21:49:01 +00:00
pierre
7bbb30ccd4
* Reset filerec mode field to fmClosed if the system call to open the file failed
...
git-svn-id: trunk@29132 -
2014-11-23 21:49:29 +00:00
Károly Balogh
2fba1540c4
amicommon: removed the accidental leftovers of experiments for the last syscall fix for MorphOS
...
git-svn-id: trunk@28695 -
2014-09-19 21:17:37 +00:00
Károly Balogh
55d85fffad
amicommon: basic common debug facilities, influenced by Debug/DebugLn of the AROS port
...
git-svn-id: trunk@28694 -
2014-09-19 20:40:43 +00:00
marcus
64769b847a
amicommon: GetEnv improved, EnvCount and EnvStr implemented
...
git-svn-id: trunk@28589 -
2014-09-03 19:58:08 +00:00
Károly Balogh
ef5f1b7ed2
amicommon: fixed sysdir.inc/do_chdir() to actually work on AROS
...
- fixed all Amiga-like system units to not leak the last directory
lock while changing back to the original dir in System_exit;
(a bug found by Marcus Sackrow, thanks!)
* renamed AOS_origDir to ASYS_origDir
git-svn-id: trunk@28537 -
2014-08-30 00:58:42 +00:00
Károly Balogh
785a1690a2
amicommon: AOS_heapPool renamed to ASYS_heapPool. common stuff should start with ASYS, to avoid confusion on AmigaOS, so more to come
...
git-svn-id: trunk@28533 -
2014-08-28 21:50:05 +00:00
marcus
4ef87579eb
amicommon: GetLocalTime correct millisecond value
...
git-svn-id: trunk@28526 -
2014-08-27 15:36:52 +00:00
Károly Balogh
0a2899573a
amicommon: merged another AROS branch fix, avoid using GetCurrentDirName in do_GetDir since that doesn't work when started from WB
...
git-svn-id: trunk@28517 -
2014-08-24 15:09:29 +00:00
Károly Balogh
cba1962284
amicommon: backported seeking fixes from AROS branch, which actually apply to all Am*ga platforms
...
git-svn-id: trunk@28516 -
2014-08-24 14:56:36 +00:00
Károly Balogh
8169fd6255
amicommon: a better and less hacky way to retrive the path. additionally this variant also works properly on AROS
...
git-svn-id: trunk@28513 -
2014-08-23 14:03:51 +00:00
Károly Balogh
26d53cfa55
amicommon: Amiga/m68k RTL now uses the common code
...
git-svn-id: trunk@28509 -
2014-08-21 23:49:21 +00:00
Károly Balogh
65f13ac118
amicommon: a common Amiga RTL implementation based on the current AROS one, and made AROS port to use it
...
git-svn-id: trunk@28507 -
2014-08-21 22:33:07 +00:00