From a0c25dc0f90d4d97204416052024549e9acd8de4 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 28 Nov 2010 20:46:50 +0000 Subject: [PATCH] - removes Thread_count from the system unit of several OSes: the value of this variable was unpredictable and the hebaviour was not fixable, resolves #18089 git-svn-id: trunk@16472 - --- rtl/nativent/system.pp | 2 -- rtl/symbian/system.pp | 2 -- rtl/win/syswin.inc | 3 --- rtl/win32/system.pp | 2 -- rtl/win64/system.pp | 3 --- rtl/wince/system.pp | 5 ----- 6 files changed, 17 deletions(-) diff --git a/rtl/nativent/system.pp b/rtl/nativent/system.pp index 290938b22b..cce7d74cc8 100644 --- a/rtl/nativent/system.pp +++ b/rtl/nativent/system.pp @@ -78,8 +78,6 @@ const sLineBreak = LineEnding; - { Thread count for DLL } - Thread_count : longint = 0; System_exception_frame : PEXCEPTION_FRAME =nil; implementation diff --git a/rtl/symbian/system.pp b/rtl/symbian/system.pp index cd3b5921ce..d764c0057a 100644 --- a/rtl/symbian/system.pp +++ b/rtl/symbian/system.pp @@ -61,8 +61,6 @@ const sLineBreak = LineEnding; DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF; - { Thread count for DLL } - Thread_count : longint = 0; System_exception_frame : PEXCEPTION_FRAME =nil; type diff --git a/rtl/win/syswin.inc b/rtl/win/syswin.inc index 62c58646e8..9a1c839f5b 100644 --- a/rtl/win/syswin.inc +++ b/rtl/win/syswin.inc @@ -50,8 +50,6 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry end; DLL_THREAD_ATTACH : begin - inclocked(Thread_count); - if Win32GetCurrentThreadId <> MainThreadIdWin32 then begin { Allocate Threadvars } @@ -68,7 +66,6 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry end; DLL_THREAD_DETACH : begin - declocked(Thread_count); if assigned(Dll_Thread_Detach_Hook) then Dll_Thread_Detach_Hook(DllParam); { Release Threadvars } diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index 67dd8a38d2..8233cb8bdd 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -66,8 +66,6 @@ const sLineBreak = LineEnding; DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF; - { Thread count for DLL } - Thread_count : longint = 0; System_exception_frame : PEXCEPTION_FRAME =nil; type diff --git a/rtl/win64/system.pp b/rtl/win64/system.pp index 8ffd6eb098..5cbbac549b 100644 --- a/rtl/win64/system.pp +++ b/rtl/win64/system.pp @@ -63,9 +63,6 @@ const sLineBreak = LineEnding; DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF; - { Thread count for DLL } - Thread_count : longint = 0; - type TStartupInfo = record cb : longint; diff --git a/rtl/wince/system.pp b/rtl/wince/system.pp index 04b4d56dd8..8cfb438bbb 100644 --- a/rtl/wince/system.pp +++ b/rtl/wince/system.pp @@ -57,9 +57,6 @@ const sLineBreak = LineEnding; DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF; - { Thread count for DLL } - Thread_count : longint = 0; - var { WinCE Info } hprevinst, @@ -864,14 +861,12 @@ begin end; DLL_THREAD_ATTACH : begin - inclocked(Thread_count); { Allocate Threadvars ?!} if assigned(Dll_Thread_Attach_Hook) then Dll_Thread_Attach_Hook(DllParam); end; DLL_THREAD_DETACH : begin - declocked(Thread_count); if assigned(Dll_Thread_Detach_Hook) then Dll_Thread_Detach_Hook(DllParam); { Release Threadvars ?!}