Bläddra i källkod

* unix, netwlibc and netware now use the generic DoneThread routine,
so the widestringmanager ThreadFiniProc is called for them as well
(already ok in trunk, fixes mantis #11505)

git-svn-id: branches/fixes_2_2@11258 -

Jonas Maebe 17 år sedan
förälder
incheckning
7cc1370b9e
4 ändrade filer med 3 tillägg och 21 borttagningar
  1. 1 0
      rtl/inc/threadh.inc
  2. 0 8
      rtl/netware/systhrd.inc
  3. 2 7
      rtl/netwlibc/systhrd.inc
  4. 0 6
      rtl/unix/cthreads.pp

+ 1 - 0
rtl/inc/threadh.inc

@@ -106,6 +106,7 @@ Function SetThreadManager(Const NewTM : TThreadManager) : Boolean;
 // Needs to be exported, so the manager can call it.
 procedure InitThreadVars(RelocProc : Pointer);
 procedure InitThread(stklen:SizeUInt);
+procedure DoneThread;
 
 {*****************************************************************************
                          Multithread Handling

+ 0 - 8
rtl/netware/systhrd.inc

@@ -121,14 +121,6 @@ type
 
 
 
-procedure DoneThread;
-
-  begin
-     { release thread vars }
-     SysReleaseThreadVars;
-  end;
-
-
 function ThreadMain(param : pointer) : dword; cdecl;
 
   var

+ 2 - 7
rtl/netwlibc/systhrd.inc

@@ -95,13 +95,6 @@
         stklen : cardinal;
       end;
 
-    procedure DoneThread;
-      begin
-        { Release Threadvars }
-        WRITE_DEBUG('DoneThread, releasing threadvars'#13#10);
-        SysReleaseThreadVars;
-      end;
-
 
     function ThreadMain(param : pointer) : pointer;cdecl;
       var
@@ -120,6 +113,7 @@
         { Start thread function }
         WRITE_DEBUG('Jumping to thread function'#13#10);
         ThreadMain:=pointer(ti.f(ti.p));
+        WRITE_DEBUG('DoneThread, releasing threadvars'#13#10);
         DoneThread;
         //pthread_detach(pointer(pthread_self));
         pthread_exit (nil);
@@ -169,6 +163,7 @@
 
     procedure SysEndThread(ExitCode : DWord);
       begin
+        WRITE_DEBUG('DoneThread, releasing threadvars'#13#10);
         DoneThread;
         pthread_detach(pointer(pthread_self));
         pthread_exit(pointer(ExitCode));

+ 0 - 6
rtl/unix/cthreads.pp

@@ -186,12 +186,6 @@ Type  PINTRTLEvent = ^TINTRTLEvent;
         stklen : cardinal;
       end;
 
-    procedure DoneThread;
-      begin
-        { Release Threadvars }
-        CReleaseThreadVars;
-      end;
-
 
     function ThreadMain(param : pointer) : pointer;cdecl;
       var