fpc/rtl/unix
svenbarth 764f36a179 Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer.
Especially for the introduction of the Queue method the internal Synchronize handling was modified. Instead of handling only one event there is now a queue of events which is walked completely when CheckSynchronize is called. Each entry in the queue can carry a PRTLEvent which will be signaled when the contained method has been executed and thus Synchronize methods can still be blocking.
Exceptions inside the queued methods are either handed back to the calling method for Synchronize events or raised directly (after leaving the queue in a valid state) to the caller of CheckSynchronize.

The way platform specific adjustments can be made to TThread was changed. Instead of implementing the Constructor and Destructor directly one now implements the methods SysCreate and SysDestroy which are called from the Constructor and Destructor respectively. All RTLs were adjusted for this and should be controlled by the platform maintainers for correct compilation (Unix works).

The new method NameThreadForDebugging has two overloaded variants: one with the thread name as AnsiString and one with the thread name as UnicodeString.
By default the AnsiString variant calls the UnicodeString variant and the latter needs to be implemented. This can be changed by defining THREADNAME_IS_ANSISTRING for a platform. Then the UnicodeString variant calls the AnsiString one and the AnsiString one needs to be implemented.

Also added was a global property CPUCount for the System unit. This property returns the number of virtual cores of the system.

New methods and functions that should be implemented per platform are:
System.GetCPUCount (default returns 1)
Classes.TThread.GetSystemTimes (default zeros the struct)
Classes.TThread.NameThreadForDebugging (default does nothing)

More detailed information about the added methods will be available in the feature announcement mail.

git-svn-id: trunk@23227 -
2012-12-27 16:16:17 +00:00
..
scripts * Use gsed if present and temp directory to avoid system recompilation 2012-08-22 09:43:34 +00:00
aliasctp.inc
aliasptp.inc
baseunix.pp
bunxh.inc * move fpgetenv(pchar) to unit system for syscall based *nix rtls. 2012-09-10 09:21:56 +00:00
bunxovl.inc
bunxovlh.inc * deprecated old shortstring getenv func. 2012-09-10 09:01:24 +00:00
classes.pp
clocale.pp + RTL for AIX 2012-04-11 17:59:49 +00:00
convert.inc
crt.pp * send full x/y ansi position information in case of an X-coordinate 2012-07-17 18:03:23 +00:00
cthreads.pp * terminate with an error when initializing a critical section and recursive 2012-11-18 10:23:44 +00:00
ctypes.inc
cwstraix.inc + AIX support for cwstring 2012-04-11 18:06:22 +00:00
cwstring.pp * fixed compatilation on Haiku Alpha4 (patch by Olivier Coursière, 2012-11-10 20:26:46 +00:00
dl.pp + RTL for AIX 2012-04-11 17:59:49 +00:00
dos.pp * add platform modifiers to all locally defined functions in unix' dos unit. 2012-08-13 10:14:07 +00:00
dynlibs.inc * Added GetLoadErrorStr function by Mark Morgan Loyd (Bug ID 22321) 2012-07-11 15:31:09 +00:00
errors.pp
fpmake.inc
genfdset.inc
genfunch.inc
genfuncs.inc * move fpgetenv(pchar) to unit system for syscall based *nix rtls. 2012-09-10 09:21:56 +00:00
gensigset.inc
initc.pp + RTL for AIX 2012-04-11 17:59:49 +00:00
ipc.pp - Removed level 2 comments and control characters in comments. 2012-06-27 20:04:39 +00:00
ipccdecl.inc
keyboard.pp
lnfogdb.pp + lnfogdb unit that can use gdb to symbolicate backtraces on unix targets 2012-04-11 18:05:56 +00:00
mouse.pp
oscdecl.inc
oscdeclh.inc * link libbsd for AIX, because several UNIX routines are part of its BSD 2012-04-11 18:00:08 +00:00
ports.pp
printer.pp
serial.pp
settimeo.inc
sockets.pp
syscall.pp
syscgen.inc * move fpgetenv(pchar) to unit system for syscall based *nix rtls. 2012-09-10 09:21:56 +00:00
sysdir.inc
sysfile.inc
sysheap.inc
sysunix.inc rtl: pass exact size to delete instead of full string length 2012-09-18 00:31:21 +00:00
sysunixh.inc + FileNameCasePreserving added - see #18066 in Mantis 2012-04-15 20:56:13 +00:00
sysutils.pp Add platform independant support for "GetTickCount" and "GetTickCount64" to unit "SysUtils". "GetTickCount" is declared as deprecated from the beginning and thus "GetTickCount64" should be used instead. 2012-12-23 16:12:57 +00:00
terminfo.pp
termiosh.inc + RTL for AIX 2012-04-11 17:59:49 +00:00
timezone.inc + RTL for AIX 2012-04-11 17:59:49 +00:00
tthread.inc Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
ttyname.inc
unix.pp * sleeper vfork code copied from deleted parts so it is not lost, made 2012-05-19 14:03:20 +00:00
unixsockets.pas
unixtype.pp
unixutil.pp * more removal of deprecated functions (deprecated before 2.4.0) 2012-05-22 08:04:24 +00:00
unxdeclh.inc + RTL for AIX 2012-04-11 17:59:49 +00:00
unxovl.inc * removed an empty overloaded version of statfs that could be called recursively 2012-05-19 12:09:39 +00:00
unxovlh.inc * removed an empty overloaded version of statfs that could be called recursively 2012-05-19 12:09:39 +00:00
varutils.pp
video.pp Set local variable s to empty string at entry of transform_cp437_to_UTF8 function 2012-04-09 21:54:19 +00:00
winiconv.inc * fixed the conversion of 'UTF-8' to the corresponding code page number 2012-08-26 08:58:42 +00:00
x86.pp Return -1 for fpIOPL and set errno to ESysENoSys for non-linux systems 2012-04-09 21:55:18 +00:00