Commit Graph

38989 Commits

Author SHA1 Message Date
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
michael
0dd6c1454e * Patch from Anton to support dotted unit names (Bug ID 22919)
git-svn-id: trunk@23225 -
2012-12-26 18:09:11 +00:00
pierre
8b4603ed51 Set OSABI in elf header for openbsd OS, contributed by Pascal Stumpf
git-svn-id: trunk@23224 -
2012-12-26 15:01:38 +00:00
pierre
7457a0f321 Use new getdirentriesi49 syscall, contributed by Pascal Stumpf
git-svn-id: trunk@23223 -
2012-12-26 14:33:30 +00:00
michael
3588c39a55 * Patch by Graeme Geldenhuys to fix various issues (bug ID 23432)
git-svn-id: trunk@23222 -
2012-12-26 14:13:10 +00:00
pierre
bba4932ef9 * Fix commit 23220, by moving declaration from syscallh.inc to syscall.inc
git-svn-id: trunk@23221 -
2012-12-25 22:54:49 +00:00
pierre
70a29668a4 Try to fix simply the fpc_threadvar_relocate_proc problem
git-svn-id: trunk@23220 -
2012-12-24 16:23:30 +00:00
yury
9b799b9636 * For compatibility with existing cross-platform registry code, add registry constants to Registry unit on Windows. The constants are directly mapped to Windows unit to avoid problems.
git-svn-id: trunk@23219 -
2012-12-24 14:07:01 +00:00
marco
80c25bda92 * make onprogress public. Mantis #23476
git-svn-id: trunk@23218 -
2012-12-23 19:52:52 +00:00
marco
2b70085b61 * removed debug writeln.
git-svn-id: trunk@23216 -
2012-12-23 18:32:53 +00:00
svenbarth
e914ec7f00 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.
The default implementation of "GetTickCount" just uses the lower 32-Bit from the result of "GetTickCount64". 
The default implementation of "GetTickCount64" is based upon "Now" for systems that support a floating point unit (and thus "Now"). 
Other systems can define a "SysTimerTick" function which is used instead if "HAS_SYSTIMERTICK" is defined.

The Windows implementation of "GetTickCount" uses Windows' "GetTickCount" function. 
The implemenation of "GetTickCount64" checks whether the system is a Windows Vista or newer and then uses Windows' "GetTickCount64" function. Otherwise Windows' "GetTickCount" is used also.

The Unix implementation of "GetTickCount" is the default one. 
The "GetTickCount64" implementation uses "fpgettimeofday".

git-svn-id: trunk@23215 -
2012-12-23 16:12:57 +00:00
sergei
d967566a37 * Changed TExternalAssembler.CreateSmartLinkPath to use ansistrings (TPathStr), like the rest of file handling routines do.
git-svn-id: trunk@23214 -
2012-12-23 14:11:27 +00:00
sergei
27c626245b * Reuse RecordRTTI to finalize class instances. This is possible because RTTI for classes is the same as for records (except different value of tkKind field), and RecordRTTI ignores tkKind (assuming that required checks are done by its caller).
git-svn-id: trunk@23213 -
2012-12-23 12:10:11 +00:00
marco
4dbe24d375 * some position 64-bit fixes found when I did a quick investigation of #23482
Don't know if this solves that though.

git-svn-id: trunk@23211 -
2012-12-22 19:59:58 +00:00
michael
3f1111649b * Small improvement to dumprecord
git-svn-id: trunk@23210 -
2012-12-22 17:01:57 +00:00
michael
0602984934 * Compile fpapache24
git-svn-id: trunk@23209 -
2012-12-22 16:39:18 +00:00
michael
17ec1d4266 * Version of apache module application that works with Apache 2.4
git-svn-id: trunk@23208 -
2012-12-22 16:37:50 +00:00
michael
5180320841 * Avoid nameclash in apr too
git-svn-id: trunk@23207 -
2012-12-22 16:36:43 +00:00
michael
26bab0d14f * Also compile httpd24
git-svn-id: trunk@23206 -
2012-12-22 16:31:41 +00:00
yury
2012220aec * Fixed HKEY_xxx defines for win64. For example HKEY_CLASSES_ROOT should be $FFFFFFFF80000000 on win64 instead of $80000000. Most registry API functions accept invalid HKEY_xxx values. But some registry functions like RegOverridePredefKey() require proper values. I had spent several hours fighting with RegOverridePredefKey() on win64 until I have found what had been wrong.
git-svn-id: trunk@23205 -
2012-12-22 16:15:32 +00:00
michael
6ee8cade08 * httpd 2.4 (Apache 2.4) headers by A. Borka
git-svn-id: trunk@23204 -
2012-12-22 12:41:25 +00:00
marco
a929eb36cb * Fix for #23470, also free fcommands
git-svn-id: trunk@23203 -
2012-12-21 21:49:23 +00:00
yury
5556fecdf0 * Include regdef.inc only if XMLREG is defined (non-Windows platforms). On Windows it is not needed since the Windows unit is included and it has all necessary declarations. Keeping duplicate declarations in regdef.inc on Windows is dangerous since it leads to out of sync problems.
* Cleanup regdef.inc to contain only necessary types and constants to work with registry unit on non-Windows platforms.

git-svn-id: trunk@23202 -
2012-12-21 14:53:44 +00:00
sergei
1116bc3542 * Fixed incorrect condition (a linked list always has at least one dummy element) which was causing every unit to have a threadvar table, regardless of actual presence of threadvars. For units without code, this was causing creation of .o files which aren't necessary otherwise.
git-svn-id: trunk@23201 -
2012-12-21 14:13:30 +00:00
lacak
30f96442ca fcl-db: postgresql: catalog_name for GetSchemaInfoSQL
git-svn-id: trunk@23200 -
2012-12-21 12:48:32 +00:00
sergei
f9dbcbd0c3 - Removed duplicate file header
git-svn-id: trunk@23199 -
2012-12-21 09:16:23 +00:00
lacak
7e1dcce60b fcl-db: postgresql: increase max allowed string field length. Fix for existing test TTestFieldTypes.TestStringLargerThen8192.
(using MaxSamllint is inspired by Delphi dbExpress, where my  tests shows, that max supported length is 32767 if used char/varchar with length above this limit various errors appears like "Invalid field size")

git-svn-id: trunk@23198 -
2012-12-21 06:49:27 +00:00
sergei
278fbb742e * mips-linux: call SetErrno in order to remove dependence on threadvar implementation details.
git-svn-id: trunk@23197 -
2012-12-21 04:42:41 +00:00
michael
2ab822c5f0 * Forgot to commit images
git-svn-id: trunk@23196 -
2012-12-20 17:16:17 +00:00
michael
366cd2d9c2 * Fixed unresolved elements in tree
git-svn-id: trunk@23195 -
2012-12-20 16:21:14 +00:00
michael
bc60ea4713 * Added ability to create class chart
git-svn-id: trunk@23194 -
2012-12-20 15:54:24 +00:00
michael
2c26d53f9b * Added ability to create class chart
git-svn-id: trunk@23193 -
2012-12-20 15:00:10 +00:00
reiniero
c9e838e2f9 + FCL-DB: db test framework: add test for issue #23509: locate must ignore lopartialkey for non-string fields
git-svn-id: trunk@23192 -
2012-12-19 15:58:58 +00:00
reiniero
e4ed8ea35b - FCL-DB: db test framework: clean up dbf export code (duplicate functionality since r23164)
git-svn-id: trunk@23191 -
2012-12-19 13:21:22 +00:00
reiniero
4556129de7 * FCL-DB: only honour lopartialkey for locate on indexed fields if field is string type.
This aligns behaviour with non-indexed locate as well as fpc bufdataset.
Partly addresses issue #23509

git-svn-id: trunk@23190 -
2012-12-19 13:11:47 +00:00
lacak
9f60eca94f fcl-db: tests: move IFDEF to proper position
git-svn-id: trunk@23189 -
2012-12-19 08:27:04 +00:00
sergei
c766c50907 * Proper fix for SPARC cycling with -dCHECK_PIC, pi_needs_got additionally must be set in following cases:
1) tguidconstnode.pass_1 (location is LOC_CREFERENCE)
  2) tonnode.pass_1 (generic secondpass references VMT of exception class)
  3) Conversion from unsigned to floating-point involves 'magic constant' as GOT-relative data object.
  4) Case jumptable address is loaded relative to GOT.

(1) and (2) also provide more accurate setting of pi_needs_got for all targets.

git-svn-id: trunk@23188 -
2012-12-18 17:56:56 +00:00
pierre
658968ef44 Add debugging generation ability for m68k compiler
git-svn-id: trunk@23187 -
2012-12-18 15:57:40 +00:00
pierre
c979ded1f9 Use FPUSOFT instead of CPUCOLDFIRE for settings some m68k software macors
git-svn-id: trunk@23186 -
2012-12-18 15:20:33 +00:00
pierre
14c5fceb45 Add fpc_longword_to_double
git-svn-id: trunk@23185 -
2012-12-18 15:17:48 +00:00
pierre
6d5f2e0cf2 Regenerated after: Add lineinfo
git-svn-id: trunk@23184 -
2012-12-18 15:16:37 +00:00
pierre
bb6355e716 Add lineinfo
git-svn-id: trunk@23183 -
2012-12-18 15:15:26 +00:00
pierre
daccd0d283 Add aliases fro mkdir/rmdir/chdir
git-svn-id: trunk@23182 -
2012-12-18 15:14:13 +00:00
pierre
11e743e5b8 Use FPC_INCLUDE_LONGWORD_TO_DOUBLE for m68k
git-svn-id: trunk@23181 -
2012-12-18 15:11:48 +00:00
pierre
ab52c48520 Add DynLinkStr support
git-svn-id: trunk@23180 -
2012-12-18 15:08:59 +00:00
pierre
39219cc30f Also handle fpu_soft
git-svn-id: trunk@23179 -
2012-12-18 15:07:13 +00:00
pierre
2a610e74b7 Also handle fpu_soft
git-svn-id: trunk@23178 -
2012-12-18 15:06:24 +00:00
pierre
080034982f Use GasCpuTypeStr array: GAS uses different names for cpu variants
git-svn-id: trunk@23177 -
2012-12-18 15:04:57 +00:00
pierre
0af0da69b1 New GasCpuTypeStr array: GAS uses different names for cpu variants
git-svn-id: trunk@23176 -
2012-12-18 15:00:38 +00:00
pierre
548a687a17 LOC_FPUREGISTER is not used for func_getretloc ig using fpu_soft
git-svn-id: trunk@23175 -
2012-12-18 14:58:53 +00:00