fpc/rtl/go32v2
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
..
classes.pp
crt.pp * changed the parameters of gotoxy() and the return values of wherex/wherey 2009-05-24 11:48:49 +00:00
dos.pp * Init use_proxy to false, Mantis #21097 2012-01-17 07:57:39 +00:00
dpmi.inc
dpmiexcp.pp Fix handling of ctrl-c/ctrl-break on go32v2: 2008-06-24 17:02:17 +00:00
dxeload.pp
dxetype.pp
emu387.pp * AllowDirectorySeparators and AllowDriveSeparators typed constants 2008-01-29 23:04:56 +00:00
exceptn.as
exit16.ah
exit16.asm
fpu.as
go32.pp * make sure to preserve edi in free_memory_block 2007-08-09 18:41:27 +00:00
initc.pp
keyboard.pp
Makefile * synchronised with trunk up to r21067 2012-04-26 21:24:20 +00:00
Makefile.fpc * add definition of SYSTEMUNIT variable in Makefile.fpc's that didn't have 2011-09-02 16:06:10 +00:00
mouse.pp * (slightly modified) patch by Laaca - avoid disappearing mouse cursor 2008-03-30 19:31:48 +00:00
msmouse.pp
ports.pp
printer.pp
profile.pp
sbrk16.ah
sbrk16.asm
sysdir.inc + FileNameCasePreserving added - see #18066 in Mantis 2012-04-15 21:21:53 +00:00
sysfile.inc * AllowDirectorySeparators and AllowDriveSeparators typed constants 2008-01-29 23:04:56 +00:00
sysheap.inc * Convert heap to ptruint. 2007-07-04 19:46:47 +00:00
sysos.inc * preserve gs in far_strlen 2007-08-09 18:51:15 +00:00
sysosh.inc
system.pp + FileNameCasePreserving added - see #18066 in Mantis 2012-04-15 20:56:13 +00:00
sysutils.pp * fix FileExists/DirectoryExists wrongly accepting non-existing entries with wrong path due to path normalization using ExpandFileName (correctly) accepting also non-existing paths 2012-04-15 19:46:33 +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
v2prt0.as * Try to fix go32v2 problems related to DJGPP 2.04 CVS code using __environ as alias of _environ 2012-01-19 17:12:03 +00:00
varutils.pp
vesamode.pp
video.pp * (slightly modified) patch by Laaca - avoid disappearing mouse cursor 2008-03-30 19:31:48 +00:00