race conditions in case DoTerminate can cause the thread to be freed
already. Side-effect: changing FreeOnTerminate in DoTerminate no longer
has any effects, but this is compatible with the generic code for
ThreadProc in objpas/classes/classes.inc (patch by Nikolai ZHUBR)
git-svn-id: trunk@14504 -
for qwordbool) + test:
o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
o these types are now all signed
o converting an integer type to a byte/word/long/qwordbool using an
explicit type cast keeps the integer's original value stored in the
bool, instead of forcing it to ord(true)/ord(false)
(mantis #10233 and #10613, implemented for all architectures, testsuite
tested for ppc32, sparc and x86)
* fixed some places where the rtl depended on longbool(true) having the
value 1
* extended several boolean tests (and adapted some to no longer assume
that byte/word/long/qwordbool(true)=1)
+ support for converting to qwordbool in second_int_to_bool for x86, ppc
and sparc
git-svn-id: trunk@9898 -
(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 -
on unix
* fixed some dataraces in unix' suspend/resume (although they can't
be solved completely due to no possibility to atomically
suspend/resume and set fsuspended at the same time)
git-svn-id: trunk@5677 -
sem_open/sem_close for Darwin (doesn't have sem_init/sem_destroy)
+ implementation of cSemaphore* based on pipes (for potential future
systems that don't have either sem* routines)
+ test for basicrtlevent
* fixed datarace whereby a TThread could be started, run and exit before
TThread.AfterConstructor had been called (Mantis 6693, all platforms)
* throw EThread exceptions in TThread.create if something during creating
the tthread goes wrong (*nix)
* don't crash in TThread.Destroy if the TThread throws an exception before
it was fully initialised (*nix)
* changed order of operations in TThread.Destroy so it doesn't perform
invalid thread operations in some edge cases (*nix)
* fixed usage of sem_wait/sem_trywait (can be interrupted) in Semaphore
and RTLEvent implementations
* fixed erroneous waiting for threads after they had already exited via
pthread_detach/pthread_exit
* fixed several memory leaks in case of thread intialisation errors
(*nix)
* unified tthread.inc for all Unices
git-svn-id: trunk@5662 -