-- --
------------------------------------------------------------------------------
--- This package provides facilities for creation of foreign threads for
--- use as Ada tasks. In order to execute general Ada code, the run-time
--- system must know about all tasks. This package allows foreign code,
--- e.g. a C program, to create a thread that the Ada run-time knows about.
+-- This package provides facilities for creation or registration of foreign
+-- threads for use as Ada tasks. In order to execute general Ada code, the
+-- run-time system must know about all tasks. This package allows foreign
+-- code, e.g. a C program, to create a thread that the Ada run-time knows
+-- about, or to register the current thread.
+
+-- For some implementations of GNAT Pro, the registration of foreign threads
+-- is automatic. However, in such implementations, if the Ada program has no
+-- tasks at all and no tasking constructs other than delay, then by default
+-- the non-tasking version of the Ada run-time will be loaded. If foreign
+-- threads are present, it is important to ensure that the tasking version
+-- of the Ada run time is loaded. This may be achieved by adding "with
+-- GNAT.Threads" to any unit in the partition.
with System;
with Ada.Task_Identification;
@cindex Threads, foreign
@noindent
-Provides facilities for creating and destroying threads with explicit calls.
-These threads are known to the GNAT run-time system. These subprograms are
-exported C-convention procedures intended to be called from foreign code.
-By using these primitives rather than directly calling operating systems
-routines, compatibility with the Ada tasking run-time is provided.
+Provides facilities for dealing with foreign threads which need to be known
+by the GNAT run-time system. Consult the documentation of this package for
+further details if your program has threads that are created by a non-Ada
+environment which then accesses Ada code.
@node GNAT.Traceback (g-traceb.ads)
@section @code{GNAT.Traceback} (@file{g-traceb.ads})