fpc/rtl/morphos
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
..
aboxlib.pas
ahi.pas
asl.pas
classes.pp
clipboard.pas
datatypes.pas
dos.pp * have a larger buffer for Exec() (can't remember if this was actually an useful change, but let's have it commited, as next snapshot will have this code anyway) 2009-02-25 21:32:29 +00:00
doslib.pp
doslibd.inc
doslibf.inc
emuld.inc
exec.pp
execd.inc
execf.inc
get9.pas
graphics.pas + ObtainPen()'s 2nd argument is actually a longint, not cardinal, 2008-10-27 09:27:07 +00:00
hardware.pas
inputevent.pas
intuition.pas
keyboard.pp * fixed typo 2009-02-28 12:14:59 +00:00
keymap.pas
kvm.pp
layers.pas
Makefile * synchronised with trunk up to r21067 2012-04-26 21:24:20 +00:00
Makefile.fpc * the default string type for the JVM target is no longer automatically 2011-08-20 08:35:47 +00:00
mouse.pp * Somewhat working mouse support (left button + moves), only to be used with FV 2009-02-26 00:46:27 +00:00
mui.pas
muihelper.pas
prt0.as
sockets.pp
sysdir.inc + fixed sysdir.inc to follow recent rtl changes. trunk now cycles again on MorphOS. 2010-01-04 23:49:46 +00:00
sysfile.inc
sysheap.inc
sysos.inc
sysosh.inc
system.pp + FileNameCasePreserving added - see #18066 in Mantis 2012-04-15 20:56:13 +00:00
sysutils.pp * Added share mode argument to FileCreate call 2011-05-23 21:11:07 +00:00
timer.pp
timerd.inc
timerf.inc
tinygl.pp
tthread.inc Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
utild1.inc
utild2.inc
utilf.inc
utility.pp
varutils.pp
video.pp * added right mousebutton support 2009-02-28 12:12:19 +00:00
videodata.inc * fixes and optimizations in video unit 2008-10-23 23:40:36 +00:00