Sfoglia il codice sorgente

* define MT for multithreading introduced

florian 26 anni fa
parent
commit
0e450cfb2c
2 ha cambiato i file con 20 aggiunte e 3 eliminazioni
  1. 15 1
      rtl/go32v2/system.pp
  2. 5 2
      rtl/go32v2/thread.inc

+ 15 - 1
rtl/go32v2/system.pp

@@ -1191,6 +1191,9 @@ begin
 end;
 {$endif RTLLITE}
 
+{$ifdef MT}
+{$I thread.inc}
+{$endif MT}
 
 var
   temp_int : tseginfo;
@@ -1207,6 +1210,14 @@ Begin
   loweststack:=maxlongint;
 { Setup heap }
   InitHeap;
+
+{$ifdef MT}
+  { before this, you can't use thread vars !!!! }
+  { threadvarblocksize is calculate before the initialization }
+  { of the system unit                                        }
+  getmem(mainprogramthreadblock,threadvarblocksize);
+{$endif MT}
+
 { Setup stdin, stdout and stderr }
   OpenStdIO(Input,fmInput,StdInputHandle);
   OpenStdIO(Output,fmOutput,StdOutputHandle);
@@ -1222,7 +1233,10 @@ Begin
 End.
 {
   $Log$
-  Revision 1.8  1999-04-08 12:23:02  peter
+  Revision 1.9  1999-04-28 06:01:25  florian
+    * define MT for multithreading introduced
+
+  Revision 1.8  1999/04/08 12:23:02  peter
     * removed os.inc
 
   Revision 1.7  1999/03/10 22:15:28  florian

+ 5 - 2
rtl/go32v2/thread.inc

@@ -36,9 +36,12 @@ function relocate_threadvar(offset : dword) : pointer;[public,alias: 'FPC_RELOCA
      movl mainprogramthreadblock,%eax
      addl offset,%eax
   end;
+
 {
   $Log$
-  Revision 1.1  1999-04-27 19:41:06  florian
-    + first implementation for DOS, only a dummy
+  Revision 1.2  1999-04-28 06:01:26  florian
+    * define MT for multithreading introduced
 
+  Revision 1.1  1999/04/27 19:41:06  florian
+    + first implementation for DOS, only a dummy
 }