The sources of the Free Pascal compiler, RTL, packages and utilities. See https://www.freepascal.org/ for more info.
Go to file
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
compiler Set OSABI in elf header for openbsd OS, contributed by Pascal Stumpf 2012-12-26 15:01:38 +00:00
ide * increased IDE copyright year 2012-10-28 21:27:59 +00:00
installer * regenerated with jvm support, so top level 'make clean' works for jvm targets 2012-09-27 21:35:11 +00:00
packages * Patch from Anton to support dotted unit names (Bug ID 22919) 2012-12-26 18:09:11 +00:00
rtl Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
tests Add support for generic type constraints. They are currently only useful to stop specialization of a generic. The parsing of a generic is still too lax and needs to be changed in the future... 2012-12-16 13:44:58 +00:00
utils * Patch from Anton to support dotted unit names (Bug ID 22919) 2012-12-26 18:09:11 +00:00
.gitattributes * Version of apache module application that works with Apache 2.4 2012-12-22 16:37:50 +00:00
.gitignore * more finegrained parallelism support for testsuite runs: the tests are no 2012-06-03 17:56:28 +00:00
Makefile * regened toplevel makefile. Some spelling fixes in the versioncheck errormsg were in Makefile.fpc, but hadn't propagated to Makefile. 2012-10-31 08:09:04 +00:00
Makefile.fpc * starting compiler version check to toplevel "all" target 2012-10-17 18:03:41 +00:00