mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:29:21 +02:00
- 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 -
This commit is contained in:
parent
6b42ba170b
commit
a0c25dc0f9
@ -78,8 +78,6 @@ const
|
|||||||
|
|
||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
|
|
||||||
{ Thread count for DLL }
|
|
||||||
Thread_count : longint = 0;
|
|
||||||
System_exception_frame : PEXCEPTION_FRAME =nil;
|
System_exception_frame : PEXCEPTION_FRAME =nil;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
@ -61,8 +61,6 @@ const
|
|||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||||
|
|
||||||
{ Thread count for DLL }
|
|
||||||
Thread_count : longint = 0;
|
|
||||||
System_exception_frame : PEXCEPTION_FRAME =nil;
|
System_exception_frame : PEXCEPTION_FRAME =nil;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -50,8 +50,6 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry
|
|||||||
end;
|
end;
|
||||||
DLL_THREAD_ATTACH :
|
DLL_THREAD_ATTACH :
|
||||||
begin
|
begin
|
||||||
inclocked(Thread_count);
|
|
||||||
|
|
||||||
if Win32GetCurrentThreadId <> MainThreadIdWin32 then
|
if Win32GetCurrentThreadId <> MainThreadIdWin32 then
|
||||||
begin
|
begin
|
||||||
{ Allocate Threadvars }
|
{ Allocate Threadvars }
|
||||||
@ -68,7 +66,6 @@ function Dll_entry{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}(const info : TEntry
|
|||||||
end;
|
end;
|
||||||
DLL_THREAD_DETACH :
|
DLL_THREAD_DETACH :
|
||||||
begin
|
begin
|
||||||
declocked(Thread_count);
|
|
||||||
if assigned(Dll_Thread_Detach_Hook) then
|
if assigned(Dll_Thread_Detach_Hook) then
|
||||||
Dll_Thread_Detach_Hook(DllParam);
|
Dll_Thread_Detach_Hook(DllParam);
|
||||||
{ Release Threadvars }
|
{ Release Threadvars }
|
||||||
|
@ -66,8 +66,6 @@ const
|
|||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||||
|
|
||||||
{ Thread count for DLL }
|
|
||||||
Thread_count : longint = 0;
|
|
||||||
System_exception_frame : PEXCEPTION_FRAME =nil;
|
System_exception_frame : PEXCEPTION_FRAME =nil;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -63,9 +63,6 @@ const
|
|||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||||
|
|
||||||
{ Thread count for DLL }
|
|
||||||
Thread_count : longint = 0;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TStartupInfo = record
|
TStartupInfo = record
|
||||||
cb : longint;
|
cb : longint;
|
||||||
|
@ -57,9 +57,6 @@ const
|
|||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||||
|
|
||||||
{ Thread count for DLL }
|
|
||||||
Thread_count : longint = 0;
|
|
||||||
|
|
||||||
var
|
var
|
||||||
{ WinCE Info }
|
{ WinCE Info }
|
||||||
hprevinst,
|
hprevinst,
|
||||||
@ -864,14 +861,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
DLL_THREAD_ATTACH :
|
DLL_THREAD_ATTACH :
|
||||||
begin
|
begin
|
||||||
inclocked(Thread_count);
|
|
||||||
{ Allocate Threadvars ?!}
|
{ Allocate Threadvars ?!}
|
||||||
if assigned(Dll_Thread_Attach_Hook) then
|
if assigned(Dll_Thread_Attach_Hook) then
|
||||||
Dll_Thread_Attach_Hook(DllParam);
|
Dll_Thread_Attach_Hook(DllParam);
|
||||||
end;
|
end;
|
||||||
DLL_THREAD_DETACH :
|
DLL_THREAD_DETACH :
|
||||||
begin
|
begin
|
||||||
declocked(Thread_count);
|
|
||||||
if assigned(Dll_Thread_Detach_Hook) then
|
if assigned(Dll_Thread_Detach_Hook) then
|
||||||
Dll_Thread_Detach_Hook(DllParam);
|
Dll_Thread_Detach_Hook(DllParam);
|
||||||
{ Release Threadvars ?!}
|
{ Release Threadvars ?!}
|
||||||
|
Loading…
Reference in New Issue
Block a user