Commit 6411a62f by Robert Dewar Committed by Arnaud Charlet

g-thread.ads: Document use of "with GNAT.Threads" to ensure loading the tasking version of...

2007-09-12  Robert Dewar  <dewar@adacore.com>

	* g-thread.ads: Document use of "with GNAT.Threads" to ensure loading
	the tasking version of the Ada run time when foreign threads are
	present and there are no explicit Ada tasks or tasking constructs.

	* gnat_rm.texi: Clarify documentation of GNAT.Threads.

From-SVN: r128428
parent 1ab9541b
...@@ -31,10 +31,19 @@ ...@@ -31,10 +31,19 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- This package provides facilities for creation of foreign threads for -- This package provides facilities for creation or registration of foreign
-- use as Ada tasks. In order to execute general Ada code, the run-time -- threads for use as Ada tasks. In order to execute general Ada code, the
-- system must know about all tasks. This package allows foreign code, -- run-time system must know about all tasks. This package allows foreign
-- e.g. a C program, to create a thread that the Ada run-time knows about. -- 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 System;
with Ada.Task_Identification; with Ada.Task_Identification;
......
...@@ -13661,11 +13661,10 @@ between tasks is very rarely expected. ...@@ -13661,11 +13661,10 @@ between tasks is very rarely expected.
@cindex Threads, foreign @cindex Threads, foreign
@noindent @noindent
Provides facilities for creating and destroying threads with explicit calls. Provides facilities for dealing with foreign threads which need to be known
These threads are known to the GNAT run-time system. These subprograms are by the GNAT run-time system. Consult the documentation of this package for
exported C-convention procedures intended to be called from foreign code. further details if your program has threads that are created by a non-Ada
By using these primitives rather than directly calling operating systems environment which then accesses Ada code.
routines, compatibility with the Ada tasking run-time is provided.
@node GNAT.Traceback (g-traceb.ads) @node GNAT.Traceback (g-traceb.ads)
@section @code{GNAT.Traceback} (@file{g-traceb.ads}) @section @code{GNAT.Traceback} (@file{g-traceb.ads})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment