fpc/rtl/objpas
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 Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
sysutils Add platform independant support for "GetTickCount" and "GetTickCount64" to unit "SysUtils". "GetTickCount" is declared as deprecated from the beginning and thus "GetTickCount64" should be used instead. 2012-12-23 16:12:57 +00:00
character.pas rtl: patch from Inoussa to complete TCharacter class implementation (mantis #0020302): 2011-09-30 00:15:37 +00:00
convutil.inc
convutil.pp
convutils.pp
cvarutil.inc * Cleanup variant->string conversions: TryStrToDate and TryStrToTime are redundant because TryStrToDateTime already does the same checks. Patch from Luiz Americo, resolves #19115. 2011-04-07 04:10:54 +00:00
dateutil.inc * Added UniversalTimeToLocal LocalTimeToUniversal as per bug #17435 2012-07-11 10:15:25 +00:00
dateutil.pp
dateutils.pp
fgl.pp rtl/objpas/fgl.pp: 2012-11-19 19:23:58 +00:00
fmtbcd.pp rtl: reduce warnings about deprecated symbol access 2012-04-23 05:57:44 +00:00
freebidi.pp * Fixed spell error revealed by lintian. 2010-10-06 20:33:57 +00:00
math.pp * SinCos overloads added, resolves #22663 2012-08-19 22:09:03 +00:00
objpas.pp * Ansistring versions of MkDir,ChDir,RmDir: make a full copy of argument string. This is necessary because underlying implementations can modify directory separators in argument, causing crash if argument resides in read-only memory. This is also consistent with shortstring variants of same procedures. 2012-11-16 18:27:55 +00:00
README.txt
rtlconst.inc Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer. 2012-12-27 16:16:17 +00:00
rtlconst.pp
rtlconsts.pp
stdconvs.pp
strutils.pp * Added ReplaceStr and ReplaceText functions, for Delphi compatibility 2012-07-07 08:12:07 +00:00
sysconst.pp * Moved ExceptObjProc from objpas to system, because it is going to be called from system. Also added ExceptClsProc variable. 2011-12-09 14:52:26 +00:00
types.pp * alias a few more types on windows. This makes developing portable software easier, since one doesn't have to conditionally import windows for e.g. tfiletime. 2012-02-18 19:20:07 +00:00
typinfo.pp * due to different result handling of integers and interfaces, GetInterfaceProp cannot use GetOrdProp, resolves #21684 2012-04-12 21:50:03 +00:00
unicodedata2.inc rtl: update character.pas by Inoussa OUEDRAOGO (issue #0020302) 2011-09-24 15:17:12 +00:00
unicodedata.inc rtl: update character.pas by Inoussa OUEDRAOGO (issue #0020302) 2011-09-24 15:17:12 +00:00
utf8bidi.pp * Fixed spell error revealed by lintian. 2010-10-06 20:33:57 +00:00
varutilh.inc * Partially undo revision 16529: removing VariantToShortString breaks webtbs/tw14536 which calls the mentioned function directly instead of using typecast. 2010-12-11 23:25:20 +00:00
varutils.inc * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346 2011-09-27 20:22:40 +00:00

This directory contains units that are part of the Object Pascal support 
of the Free Pascal Compiler.

You can find here the following files:

objpas.pp : makes Free Pascal more Borland Delphi compatible, data types
            are redefined

math.pp : Contains basic mathematical functions, as well as some financial
          functions.

sysutils.pp : Contains the exception support of the Free Pascal Compiler.

sysutils/*h.inc : Contain parts of the sysutils unit, with function declarations.
sysutils/*.inc  : Contain parts of the sysutils unit, with implementations of:
       dati : Date & Time handling functions.
       fina : FileName handling functions.
       sysstr : miscellaneous string handling functions, and conversion 
                routines.
       syspch : miscellaneous pchar handling functions.

Enjoy !
The Free Pascal Development Team.