Prechádzať zdrojové kódy

- Removed systhrd.inc from targets where thread manager is stub by default. Stub is installed in common thread.inc file if DISABLE_NO_THREAD_MANAGER is not defined.

git-svn-id: trunk@9558 -
yury 17 rokov pred
rodič
commit
c4e60fd1a5

+ 0 - 9
.gitattributes

@@ -4573,7 +4573,6 @@ rtl/amiga/sysheap.inc svneol=native#text/plain
 rtl/amiga/sysos.inc svneol=native#text/plain
 rtl/amiga/sysosh.inc svneol=native#text/plain
 rtl/amiga/system.pp svneol=native#text/plain
-rtl/amiga/systhrd.inc svneol=native#text/plain
 rtl/amiga/sysutils.pp svneol=native#text/plain
 rtl/amiga/timerd.inc svneol=native#text/plain
 rtl/amiga/tthread.inc svneol=native#text/plain
@@ -4693,7 +4692,6 @@ rtl/embedded/sysheap.inc svneol=native#text/plain
 rtl/embedded/sysos.inc svneol=native#text/plain
 rtl/embedded/sysosh.inc svneol=native#text/plain
 rtl/embedded/system.pp svneol=native#text/plain
-rtl/embedded/systhrd.inc svneol=native#text/plain
 rtl/emx/Makefile svneol=native#text/plain
 rtl/emx/Makefile.fpc svneol=native#text/plain
 rtl/emx/crt.pas svneol=native#text/plain
@@ -4762,7 +4760,6 @@ rtl/gba/sysheap.inc svneol=native#text/plain
 rtl/gba/sysos.inc svneol=native#text/plain
 rtl/gba/sysosh.inc svneol=native#text/plain
 rtl/gba/system.pp svneol=native#text/plain
-rtl/gba/systhrd.inc svneol=native#text/plain
 rtl/gba/sysutils.pp svneol=native#text/plain
 rtl/gba/tthread.inc svneol=native#text/plain
 rtl/gba/varutils.pp svneol=native#text/plain
@@ -4796,7 +4793,6 @@ rtl/go32v2/sysheap.inc svneol=native#text/plain
 rtl/go32v2/sysos.inc svneol=native#text/plain
 rtl/go32v2/sysosh.inc svneol=native#text/plain
 rtl/go32v2/system.pp svneol=native#text/plain
-rtl/go32v2/systhrd.inc svneol=native#text/plain
 rtl/go32v2/sysutils.pp svneol=native#text/plain
 rtl/go32v2/tthread.inc svneol=native#text/plain
 rtl/go32v2/v2prt0.as svneol=native#text/plain
@@ -5066,7 +5062,6 @@ rtl/macos/sysheap.inc svneol=native#text/plain
 rtl/macos/sysos.inc svneol=native#text/plain
 rtl/macos/sysosh.inc svneol=native#text/plain
 rtl/macos/system.pp svneol=native#text/plain
-rtl/macos/systhrd.inc svneol=native#text/plain
 rtl/macos/sysutils.pp svneol=native#text/plain
 rtl/morphos/Makefile svneol=native#text/plain
 rtl/morphos/Makefile.fpc svneol=native#text/plain
@@ -5104,7 +5099,6 @@ rtl/morphos/sysheap.inc svneol=native#text/plain
 rtl/morphos/sysos.inc svneol=native#text/plain
 rtl/morphos/sysosh.inc svneol=native#text/plain
 rtl/morphos/system.pp svneol=native#text/plain
-rtl/morphos/systhrd.inc svneol=native#text/plain
 rtl/morphos/sysutils.pp svneol=native#text/plain
 rtl/morphos/timer.pp svneol=native#text/plain
 rtl/morphos/timerd.inc svneol=native#text/plain
@@ -5133,7 +5127,6 @@ rtl/nds/sysfile.inc -text
 rtl/nds/sysheap.inc svneol=native#text/x-pascal
 rtl/nds/sysos.inc -text
 rtl/nds/sysosh.inc -text
-rtl/nds/systhrd.inc -text
 rtl/nds/sysutils.pp -text
 rtl/nds/tthread.inc -text
 rtl/nds/varutils.pp -text
@@ -5612,7 +5605,6 @@ rtl/unix/syscall.pp svneol=native#text/plain
 rtl/unix/sysdir.inc svneol=native#text/plain
 rtl/unix/sysfile.inc svneol=native#text/plain
 rtl/unix/sysheap.inc svneol=native#text/plain
-rtl/unix/systhrd.inc svneol=native#text/plain
 rtl/unix/sysunixh.inc svneol=native#text/plain
 rtl/unix/sysutils.pp svneol=native#text/plain
 rtl/unix/terminfo.pp svneol=native#text/plain
@@ -5642,7 +5634,6 @@ rtl/watcom/sysheap.inc -text
 rtl/watcom/sysos.inc -text
 rtl/watcom/sysosh.inc -text
 rtl/watcom/system.pp svneol=native#text/plain
-rtl/watcom/systhrd.inc -text
 rtl/watcom/sysutils.pp svneol=native#text/plain
 rtl/watcom/varutils.pp svneol=native#text/plain
 rtl/watcom/watcom.pp svneol=native#text/plain

+ 0 - 25
rtl/amiga/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 0 - 25
rtl/embedded/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 0 - 13
rtl/emx/systhrd.inc

@@ -146,16 +146,3 @@ procedure SysEnterCriticalSection(var cs : TRTLCriticalSection);
 
 procedure SysLeaveCriticalSection(var cs : TRTLCriticalSection);
   external 'kernel32' name 'LeaveCriticalSection';
-
-
-{*****************************************************************************
-                           Thread management
-*****************************************************************************}
-
-    procedure InitSystemThreads;
-      begin
-        SetNoThreadManager;
-      end;
-
-
-

+ 0 - 25
rtl/gba/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 0 - 25
rtl/go32v2/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 2 - 0
rtl/inc/system.inc

@@ -1231,8 +1231,10 @@ end;
 { Generic threadvar support }
 {$i threadvr.inc}
 
+{$ifdef DISABLE_NO_THREAD_MANAGER}
 { OS Dependent implementation }
 {$i systhrd.inc}
+{$endif DISABLE_NO_THREAD_MANAGER}
 {$endif FPC_HAS_FEATURE_THREADING}
 
 

+ 9 - 1
rtl/inc/thread.inc

@@ -548,5 +548,13 @@ begin
     end;
   SetThreadManager(NoThreadManager);
 end;
-{$endif DISABLE_NO_THREAD_MANAGER}
 
+Procedure InitSystemThreads;
+begin
+  { This should be changed to a real value during
+    thread driver initialization if appropriate. }
+  ThreadID := TThreadID(1);
+  SetNoThreadManager;
+end;
+
+{$endif DISABLE_NO_THREAD_MANAGER}

+ 0 - 25
rtl/macos/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002-2005 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    MacOS threading support implementation.
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 0 - 25
rtl/morphos/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 0 - 25
rtl/nds/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-

+ 1 - 0
rtl/netware/system.pp

@@ -19,6 +19,7 @@ interface
 {$define StdErrToConsole}
 {$define useLongNamespaceByDefault}
 {$define autoHeapRelease}
+{$define DISABLE_NO_THREAD_MANAGER}
 
 {$ifdef SYSTEMDEBUG}
   {$define SYSTEMEXCEPTIONDEBUG}

+ 1 - 0
rtl/netwlibc/system.pp

@@ -24,6 +24,7 @@ interface
 {$define autoHeapRelease}
 {$define IOpossix}
 {$define DisableArrayOfConst}
+{$define DISABLE_NO_THREAD_MANAGER}
 
 {$ifdef SYSTEMDEBUG}
   {$define SYSTEMEXCEPTIONDEBUG}

+ 1 - 0
rtl/os2/system.pas

@@ -27,6 +27,7 @@ interface
 {$endif SYSTEMDEBUG}
 
 {$DEFINE OS2EXCEPTIONS}
+{$define DISABLE_NO_THREAD_MANAGER}
 
 {$I systemh.inc}
 

+ 0 - 25
rtl/unix/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := TThreadID(1);
-  SetNoThreadManager;
-end;
-
-

+ 0 - 25
rtl/watcom/systhrd.inc

@@ -1,25 +0,0 @@
-{
-    This file is part of the Free Pascal run time library.
-    Copyright (c) 2002 by Peter Vreman,
-    member of the Free Pascal development team.
-
-    Linux (pthreads) threading support implementation
-
-    See the file COPYING.FPC, included in this distribution,
-    for details about the copyright.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************}
-
-Procedure InitSystemThreads;
-begin
-  { This should be changed to a real value during
-    thread driver initialization if appropriate. }
-  ThreadID := 1;
-  SetNoThreadManager;
-end;
-
-