fpc/rtl/netwlibc
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
..
pre
classes.pp + revive generics based tfplist/tstringlist implementation for generics testing; build with FPC_TESTGENERICS 2007-03-25 19:19:04 +00:00
crt.pp * changed the parameters of gotoxy() and the return values of wherex/wherey 2009-05-24 11:48:49 +00:00
dos.pp make netwlibc compilable with current rtl 2011-02-08 22:06:53 +00:00
dynlibs.inc * Added GetLoadErrorStr function by Mark Morgan Loyd (Bug ID 22321) 2012-07-11 15:31:09 +00:00
errno.inc
initc.pp
keyboard.pp
libc.imp
libc.pp make netwlibc compilable with current rtl 2011-02-08 22:06:53 +00:00
libcclib.imp
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
netware.imp
netwsockh.inc * fix INVALID_SOCKET for other platforms too 2007-05-13 19:20:17 +00:00
nwl_dlle.as
nwl_main.as
nwsnut.imp
nwsnut.pp
qos.inc
sockets.pp * synchronized with SocketError change 2007-05-26 12:39:16 +00:00
sysdir.inc make netwlibc compilable with current rtl 2011-02-08 22:06:53 +00:00
sysfile.inc
sysheap.inc * Convert heap to ptruint. 2007-07-04 19:46:47 +00:00
sysos.inc
sysosh.inc
system.pp + FileNameCasePreserving added - see #18066 in Mantis 2012-04-15 20:56:13 +00:00
systhrd.inc + heap manager now per thread, reduce heap lock contention 2007-05-20 20:58:12 +00:00
sysutils.pp * Added share mode argument to FileCreate call 2011-05-23 21:11:07 +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
varutils.pp
video.pp
winsock.pp
ws2_32.imp
ws2nlm.imp