Browse Source

* bugfix #1639 (IsMultiThread varialbe setting)

carl 24 years ago
parent
commit
05a2276947

+ 5 - 1
fcl/beos/thread.inc

@@ -56,6 +56,7 @@ end;
 constructor TThread.Create(CreateSuspended: Boolean);
 
 begin
+ { IsMultiThread := TRUE; }
 end;
 
 
@@ -92,7 +93,10 @@ end;
 
 {
   $Log$
-  Revision 1.1  2001-09-28 02:19:13  carl
+  Revision 1.2  2001-10-09 02:28:28  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.1  2001/09/28 02:19:13  carl
   + beos target
 
  

+ 5 - 1
fcl/freebsd/thread.inc

@@ -175,6 +175,7 @@ begin
   FHandle:= Clone(@ThreadProc,pointer(FStackPointer),Flags,self);
   if FSuspended then Suspend;
   FThreadID := FHandle;
+  IsMultiThread := TRUE;
 end;
 
 
@@ -283,7 +284,10 @@ end;
 
 {
   $Log$
-  Revision 1.4  2001-04-08 11:26:03  peter
+  Revision 1.5  2001-10-09 02:27:17  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.4  2001/04/08 11:26:03  peter
     * update so it can be compiled by both 1.0.x and 1.1
 
   Revision 1.3  2001/01/21 20:45:09  marco

+ 5 - 1
fcl/go32v2/thread.inc

@@ -56,6 +56,7 @@ end;
 constructor TThread.Create(CreateSuspended: Boolean);
 
 begin
+ {IsMultiThread := TRUE; }
 end;
 
 
@@ -92,7 +93,10 @@ end;
 
 {
   $Log$
-  Revision 1.2  2000-07-13 11:32:58  michael
+  Revision 1.3  2001-10-09 02:25:20  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.2  2000/07/13 11:32:58  michael
   + removed logs
  
 }

+ 5 - 1
fcl/linux/thread.inc

@@ -175,6 +175,7 @@ begin
   FHandle:= Clone(@ThreadProc,pointer(FStackPointer),Flags,self);
   if FSuspended then Suspend;
   FThreadID := FHandle;
+  IsMultiThread := TRUE;
 end;
 
 
@@ -283,7 +284,10 @@ end;
 
 {
   $Log$
-  Revision 1.4  2001-04-08 11:26:03  peter
+  Revision 1.5  2001-10-09 02:24:14  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.4  2001/04/08 11:26:03  peter
     * update so it can be compiled by both 1.0.x and 1.1
 
   Revision 1.3  2001/01/21 20:45:09  marco

+ 5 - 1
fcl/netbsd/thread.inc

@@ -175,6 +175,7 @@ begin
   FHandle:= Clone(@ThreadProc,pointer(FStackPointer),Flags,self);
   if FSuspended then Suspend;
   FThreadID := FHandle;
+  IsMultiThread := TRUE;
 end;
 
 
@@ -283,7 +284,10 @@ end;
 
 {
   $Log$
-  Revision 1.1  2001-09-05 14:30:04  marco
+  Revision 1.2  2001-10-09 02:22:31  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.1  2001/09/05 14:30:04  marco
    * NetBSD fcl makefile fixes. Plain copy from FreeBSD
 
   Revision 1.4  2001/04/08 11:26:03  peter

+ 5 - 1
fcl/os2/thread.inc

@@ -119,6 +119,7 @@ begin
    FFinished := true;
    Destroy;
   end else FHandle := FThreadID;
+  IsMultiThread := TRUE;
 end;
 
 
@@ -161,7 +162,10 @@ end;
 
 {
   $Log$
-  Revision 1.3  2000-12-19 00:43:07  hajny
+  Revision 1.4  2001-10-09 02:21:00  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.3  2000/12/19 00:43:07  hajny
     + FCL made compilable under OS/2
 
   Revision 1.2  2000/07/13 11:33:02  michael

+ 7 - 1
fcl/template/thread.inc

@@ -56,6 +56,9 @@ end;
 constructor TThread.Create(CreateSuspended: Boolean);
 
 begin
+  { Should set the following variable to TRUE before }
+  { creating the new thread:                         }
+  IsMultiThread := TRUE;
 end;
 
 
@@ -92,7 +95,10 @@ end;
 
 {
   $Log$
-  Revision 1.2  2000-07-13 11:33:03  michael
+  Revision 1.3  2001-10-09 02:19:25  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.2  2000/07/13 11:33:03  michael
   + removed logs
  
 }

+ 5 - 1
fcl/win32/thread.inc

@@ -116,6 +116,7 @@ begin
   FSuspended := CreateSuspended;
   Flags := 0;
   if CreateSuspended then Flags := CREATE_SUSPENDED;
+  IsMultiThread := TRUE;
   FHandle := CreateThread(nil, 0, @ThreadProc, Pointer(self), Flags, DWord(FThreadID));
 end;
 
@@ -210,7 +211,10 @@ begin
 end;
 {
   $Log$
-  Revision 1.4  2001-04-17 17:36:17  peter
+  Revision 1.5  2001-10-09 02:17:45  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.4  2001/04/17 17:36:17  peter
     * fixed for stricter argument checking
 
   Revision 1.3  2000/07/25 11:27:35  jonas

+ 9 - 2
rtl/inc/systemh.inc

@@ -210,6 +210,10 @@ const
   Filemode : byte = 2;
   CmdLine : PChar = nil;
 
+ { Delphi Compatibility }
+ { assume that this program will not spawn other threads. }
+  IsMultiThread : boolean = FALSE;
+
 var
 { Standard In- and Output }
   Output,
@@ -221,7 +225,7 @@ var
   LowestStack,
   RandSeed    : Cardinal;
 { Delphi compatible }
-  IsLibrary,IsMultiThreaded,IsConsole : boolean;
+  IsLibrary,IsConsole : boolean;
 {$ifdef MT}
 ThreadVar
 {$else MT}
@@ -550,7 +554,10 @@ const
 
 {
   $Log$
-  Revision 1.35  2001-08-19 21:02:01  florian
+  Revision 1.36  2001-10-09 02:32:51  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.35  2001/08/19 21:02:01  florian
     * fixed and added a lot of stuff to get the Jedi DX( headers
       compiled
 

+ 4 - 3
rtl/win32/system.pp

@@ -1520,8 +1520,6 @@ begin
   if not IsLibrary then
     HInstance:=getmodulehandle(GetCommandFile);
   MainInstance:=HInstance;
-  { No idea how to know this issue !! }
-  IsMultithreaded:=false;
   cmdshow:=startupinfo.wshowwindow;
 { to test stack depth }
   loweststack:=maxlongint;
@@ -1569,7 +1567,10 @@ end.
 
 {
   $Log$
-  Revision 1.17  2001-08-19 21:02:02  florian
+  Revision 1.18  2001-10-09 02:37:29  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.17  2001/08/19 21:02:02  florian
     * fixed and added a lot of stuff to get the Jedi DX( headers
       compiled
 

+ 5 - 2
rtl/win32/thread.inc

@@ -144,7 +144,7 @@ function BeginThread(sa : Pointer;stacksize : dword;
 {$ifdef DEBUG_MT}
      writeln('Creating new thread');
 {$endif DEBUG_MT}
-     IsMultithreaded:=true;
+     IsMultithread:=true;
      { the only way to pass data to the newly created thread }
      { in a MT safe way, is to use the heap                  }
      new(ti);
@@ -213,7 +213,10 @@ procedure LeaveCriticalSection(var cs : tcriticalsection);
 
 {
   $Log$
-  Revision 1.4  2001-01-26 21:02:21  florian
+  Revision 1.5  2001-10-09 02:38:39  carl
+  * bugfix #1639 (IsMultiThread varialbe setting)
+
+  Revision 1.4  2001/01/26 21:02:21  florian
   *** empty log message ***
 
   Revision 1.3  2001/01/26 16:38:03  florian