From f102f33426b2319ca6d28296f9705b0e576d0247 Mon Sep 17 00:00:00 2001 From: Almindor Date: Sat, 14 Oct 2006 12:47:42 +0000 Subject: [PATCH] * fix some gliches in inithreads git-svn-id: trunk@4903 - --- rtl/darwin/tthread.inc | 2 +- rtl/freebsd/tthread.inc | 5 +++-- rtl/linux/tthread.inc | 2 +- rtl/netbsd/tthread.inc | 5 +++-- rtl/openbsd/tthread.inc | 5 +++-- rtl/solaris/tthread.inc | 5 +++-- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/rtl/darwin/tthread.inc b/rtl/darwin/tthread.inc index d1a470eac4..1af9f0d5d0 100644 --- a/rtl/darwin/tthread.inc +++ b/rtl/darwin/tthread.inc @@ -73,8 +73,8 @@ const procedure InitThreads; begin - GetThreadManager(CurrentTM); if not ThreadsInited then begin + GetThreadManager(CurrentTM); ThreadsInited := true; end; end; diff --git a/rtl/freebsd/tthread.inc b/rtl/freebsd/tthread.inc index 75acf66ec4..4c4581d3d3 100644 --- a/rtl/freebsd/tthread.inc +++ b/rtl/freebsd/tthread.inc @@ -74,9 +74,10 @@ const procedure InitThreads; begin - GetThreadManager(CurrentTM); - if not ThreadsInited then + if not ThreadsInited then begin + GetThreadManager(CurrentTM); ThreadsInited := true; + end; end; procedure DoneThreads; diff --git a/rtl/linux/tthread.inc b/rtl/linux/tthread.inc index 84d5974f92..11c602c93e 100644 --- a/rtl/linux/tthread.inc +++ b/rtl/linux/tthread.inc @@ -75,7 +75,7 @@ const procedure InitThreads; begin - if not ThreadsInited then + if not ThreadsInited then begin GetThreadManager(CurrentTM); ThreadsInited := true; GMainPid := fpgetpid(); diff --git a/rtl/netbsd/tthread.inc b/rtl/netbsd/tthread.inc index 75acf66ec4..4c4581d3d3 100644 --- a/rtl/netbsd/tthread.inc +++ b/rtl/netbsd/tthread.inc @@ -74,9 +74,10 @@ const procedure InitThreads; begin - GetThreadManager(CurrentTM); - if not ThreadsInited then + if not ThreadsInited then begin + GetThreadManager(CurrentTM); ThreadsInited := true; + end; end; procedure DoneThreads; diff --git a/rtl/openbsd/tthread.inc b/rtl/openbsd/tthread.inc index 75acf66ec4..4c4581d3d3 100644 --- a/rtl/openbsd/tthread.inc +++ b/rtl/openbsd/tthread.inc @@ -74,9 +74,10 @@ const procedure InitThreads; begin - GetThreadManager(CurrentTM); - if not ThreadsInited then + if not ThreadsInited then begin + GetThreadManager(CurrentTM); ThreadsInited := true; + end; end; procedure DoneThreads; diff --git a/rtl/solaris/tthread.inc b/rtl/solaris/tthread.inc index 75acf66ec4..4c4581d3d3 100644 --- a/rtl/solaris/tthread.inc +++ b/rtl/solaris/tthread.inc @@ -74,9 +74,10 @@ const procedure InitThreads; begin - GetThreadManager(CurrentTM); - if not ThreadsInited then + if not ThreadsInited then begin + GetThreadManager(CurrentTM); ThreadsInited := true; + end; end; procedure DoneThreads;