summaryrefslogtreecommitdiff
path: root/rtl/inc/system.inc
diff options
context:
space:
mode:
Diffstat (limited to 'rtl/inc/system.inc')
-rw-r--r--rtl/inc/system.inc21
1 files changed, 15 insertions, 6 deletions
diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc
index 0dd8c8aa50..6c432878a5 100644
--- a/rtl/inc/system.inc
+++ b/rtl/inc/system.inc
@@ -583,12 +583,12 @@ Begin
End;
-Function GetThreadID:TRTLThread;{$ifdef SYSTEMINLINE}inline;{$endif}
-begin
-(* ThreadID is stored in a threadvar and made available in interface *)
-(* to allow setup of this value during thread initialization. *)
- GetThreadID := ThreadID;
-end;
+//Function GetThreadID:TRTLThread;{$ifdef SYSTEMINLINE}inline;{$endif}
+//begin
+//(* ThreadID is stored in a threadvar and made available in interface *)
+//(* to allow setup of this value during thread initialization. *)
+// GetThreadID := ThreadID;
+//end;
function fpc_safecallcheck(res : hresult) : hresult;[public,alias:'FPC_SAFECALLCHECK']; compilerproc;
@@ -1154,6 +1154,15 @@ var
{ OS Dependent implementation }
{$i systhrd.inc}
+
+procedure InitThreading;
+begin
+ __CurrentTM := NoThreadManager;
+ fpc_threadvar_relocate_proc := nil;
+
+ InitThreadVars;
+ InitSystemThreads;
+end;
{$endif FPC_HAS_FEATURE_THREADING}