diff options
author | Robert Dewar <dewar@adacore.com> | 2007-09-12 13:58:50 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-09-12 13:58:50 +0200 |
commit | 6411a62f3678e2eaa145b1d2b98e85524aec2005 (patch) | |
tree | 580e352dcb4909f6ed631918c050350a44914a48 /gcc/ada | |
parent | 1ab9541bf8b6a08a44f6202a80f42c14a988e4bc (diff) | |
download | gcc-6411a62f3678e2eaa145b1d2b98e85524aec2005.zip gcc-6411a62f3678e2eaa145b1d2b98e85524aec2005.tar.gz gcc-6411a62f3678e2eaa145b1d2b98e85524aec2005.tar.bz2 |
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
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/g-thread.ads | 17 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 9 |
2 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ada/g-thread.ads b/gcc/ada/g-thread.ads index df2c676..b5825f3 100644 --- a/gcc/ada/g-thread.ads +++ b/gcc/ada/g-thread.ads @@ -31,10 +31,19 @@ -- -- ------------------------------------------------------------------------------ --- 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; diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index ce2daf3..61ce9a0 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -13661,11 +13661,10 @@ between tasks is very rarely expected. @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}) |