fpc/rtl
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
..
aix rtl: initialize DefaultSystemCodePage on aix,beos,haiku,solaris 2012-09-21 01:45:18 +00:00
amiga Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
android/jvm * fixed "make install" for jvm targets 2012-09-27 21:35:17 +00:00
arm Fixed error in define selecting write barrier code that has been introduced during debugging 2012-10-29 08:33:31 +00:00
atari
avr
beos Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
bsd Use new getdirentriesi49 syscall, contributed by Pascal Stumpf 2012-12-26 14:33:30 +00:00
darwin
embedded Small fixes to ARM-Embedded RTL from Jeppe Johansen 2012-10-22 11:59:28 +00:00
emx
freebsd * changed all version numbers to 900044 for freebsd 9. Expanded script to deal with 2012-10-28 20:02:00 +00:00
gba Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
go32v2 Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
haiku rtl: initialize DefaultSystemCodePage on aix,beos,haiku,solaris 2012-09-21 01:45:18 +00:00
i386 * Fixed i386 longjmp, it must not return 0 if 'value' argument happens to be 0. 2012-10-19 19:49:33 +00:00
inc Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
java * moved fpc_threadvar_relocate_proc from systemh.inc to thread.inc 2012-12-09 22:42:46 +00:00
jvm
linux * Fix commit 23220, by moving declaration from syscallh.inc to syscall.inc 2012-12-25 22:54:49 +00:00
m68k Save complete register set for setjmp/longjmp 2012-12-18 14:05:52 +00:00
macos
mips * Fix nostackframe related problems 2012-10-18 11:19:27 +00:00
mipsel
morphos Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
nativent Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
nds Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
netbsd
netware Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
netwlibc Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
objpas Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
openbsd Use new getdirentriesi49 syscall, contributed by Pascal Stumpf 2012-12-26 14:33:30 +00:00
os2 Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
palmos
powerpc
powerpc64
qnx
solaris rtl: initialize DefaultSystemCodePage on aix,beos,haiku,solaris 2012-09-21 01:45:18 +00:00
sparc * use membar only for sparcv9(+) 2012-12-03 21:55:51 +00:00
symbian
ucmaps
unix Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
watcom
wii Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
win Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
win32
win64
wince
x86_64 * fix sincos also for x86-64-linux 2012-11-04 18:02:20 +00:00
COPYING.FPC
COPYING.txt
fpmake.inc
fpmake.pp
Makefile
Makefile.fpc
README.txt

This is the Run-Time Library (RTL) tree for Free Pascal.

To recompile the RTL, edit the main makefile. The makefiles NEED a GNU make
compatible make, they need unix-like 'rm' and 'mv' commands, as well as some
others. You can find these in the gnuutils package on the ftp site.

The main makefile is located ABOVE the RTL tree. It uses the FPC
makefile.fpc to guess reasonable defaults for everything it needs.
(these files can be found in base.zip on the FTP site)

The only variable that you may want to set are
FPC             - What compiler to use. Use an absolute path. 
                  (default is ppc386)
INSTALL_UNITDIR - Where to install the RTL units 
OPT             - any special options you want to set for the compiler.

In principle, you can also descend into the subdirectory of your OS, and
type 'make' there, that should also compile everything.

The tree contains subdirectories for all the supported operating systems,
as well as all processor architectures. The processor directories contain
low-level routines which are required for the system unit (if they are not 
available in high-level language form), as well as optimized versions of
the pascal generic routines (the generic routine source code is localed in
the inc subdirectory).

The following directories are not supported officially and may not work
correctly with FreePascal v1.0:

go32v1 - The DJGPP go32v1 DOS extender (no longer supported)
palmos - The PalmOS directory for the Dragonball (incomplete)


Enjoy.