OSDN Git Service

* double-int.h (tree_to_double_int): Remove macro.
[pf3gnuchains/gcc-fork.git] / libgomp / libgomp.texi
index c48cf93..5e68aad 100644 (file)
@@ -7,13 +7,12 @@
 
 
 @copying
-Copyright @copyright{} 2006 Free Software Foundation, Inc.
+Copyright @copyright{} 2006, 2007, 2008 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
 any later version published by the Free Software Foundation; with the
-Invariant Sections being ``GNU General Public License'' and ``Funding
-Free Software'', the Front-Cover
+Invariant Sections being ``Funding Free Software'', the Front-Cover
 texts being (a) (see below), and with the Back-Cover Texts being (b)
 (see below).  A copy of the license is included in the section entitled
 ``GNU Free Documentation License''.
@@ -117,7 +116,7 @@ arranges for automatic linking of the OpenMP runtime library
 
 A complete description of all OpenMP directives accepted may be found in 
 the @uref{http://www.openmp.org, OpenMP Application Program Interface} manual,
-version 2.5.
+version 3.0.
 
 
 @c ---------------------------------------------------------------------
@@ -128,21 +127,31 @@ version 2.5.
 @chapter Runtime Library Routines
 
 The runtime routines described here are defined by section 3 of the OpenMP 
-specifications in version 2.5.
+specifications in version 3.0. The routines are structured in following
+three parts:
 
 Control threads, processors and the parallel environment.
 
 @menu
-* omp_get_dynamic::          Dynamic teams setting
-* omp_get_max_threads::      Maximum number of threads
-* omp_get_nested::           Nested parallel regions
-* omp_get_num_procs::        Number of processors online
-* omp_get_num_threads::      Size of the active team
-* omp_get_thread_num::       Current thread ID
-* omp_in_parallel::          Whether a parallel region is active
-* omp_set_dynamic::          Enable/disable dynamic teams
-* omp_set_nested::           Enable/disable nested parallel regions
-* omp_set_num_threads::      Set upper team size limit
+* omp_get_active_level::        Number of active parallel regions
+* omp_get_ancestor_thread_num:: Ancestor thread ID
+* omp_get_dynamic::             Dynamic teams setting
+* omp_get_level::               Number of parallel regions
+* omp_get_max_active_levels::   Maximal number of active regions
+* omp_get_max_threads::         Maximal number of threads of parallel region
+* omp_get_nested::              Nested parallel regions
+* omp_get_num_procs::           Number of processors online
+* omp_get_num_threads::         Size of the active team
+* omp_get_schedule::            Obtain the runtime scheduling method
+* omp_get_team_size::           Number of threads in a team
+* omp_get_thread_limit::        Maximal number of threads
+* omp_get_thread_num::          Current thread ID
+* omp_in_parallel::             Whether a parallel region is active
+* omp_set_dynamic::             Enable/disable dynamic teams
+* omp_set_max_active_levels::   Limits the number of active parallel regions
+* omp_set_nested::              Enable/disable nested parallel regions
+* omp_set_num_threads::         Set upper team size limit
+* omp_set_schedule::            Set the runtime scheduling method
 @end menu
 
 Initialize, set, test, unset and destroy simple and nested locks.
@@ -167,6 +176,63 @@ Portable, thread-based, wall clock timer.
 * omp_get_wtime::            Elapsed wall clock time.
 @end menu
 
+
+
+@node omp_get_active_level
+@section @code{omp_get_active_level} -- Number of parallel regions
+@table @asis
+@item @emph{Description}:
+This function returns the nesting level for the active parallel blocks,
+which enclose the calling call.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_get_active_level();}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{integer omp_get_active_level()}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_level}, @ref{omp_get_max_active_levels}, @ref{omp_set_max_active_levels}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.19.
+@end table
+
+
+
+@node omp_get_ancestor_thread_num
+@section @code{omp_get_ancestor_thread_num} -- Ancestor thread ID
+@table @asis
+@item @emph{Description}:
+This function returns the thread identification number for the given
+nesting level of the current thread. For values of @var{level} outside
+zero to @code{omp_get_level} -1 is returned; if @var{level} is
+@code{omp_get_level} the result is identical to @code{omp_get_thread_num}.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_get_ancestor_thread_num(int level);}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{integer omp_ancestor_thread_num(level)}
+@item                   @tab @code{integer level}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_level}, @ref{omp_get_thread_num}, @ref{omp_get_team_size}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.17.
+@end table
+
+
+
 @node omp_get_dynamic
 @section @code{omp_get_dynamic} -- Dynamic teams setting
 @table @asis
@@ -194,17 +260,68 @@ disabled by default.
 @ref{omp_set_dynamic}, @ref{OMP_DYNAMIC}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.8.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.8.
+@end table
+
+
+
+@node omp_get_level
+@section @code{omp_get_level} -- Obtain the current nesting level
+@table @asis
+@item @emph{Description}:
+This function returns the nesting level for the parallel blocks,
+which enclose the calling call.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_get level();}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{integer omp_level()}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_active_level}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.16.
+@end table
+
+
+
+@node omp_get_max_active_levels
+@section @code{omp_set_max_active_levels} -- Maximal number of active regions
+@table @asis
+@item @emph{Description}:
+This function obtains the maximally allowed number of nested, active parallel regions.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_get_max_active_levels();}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{int omp_get_max_active_levels()}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_set_max_active_levels}, @ref{omp_get_active_level}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.14.
 @end table
 
 
 
 @node omp_get_max_threads
-@section @code{omp_get_max_threads} -- Maximum number of threads
+@section @code{omp_get_max_threads} -- Maximal number of threads of parallel region
 @table @asis
 @item @emph{Description}:
-Return the maximum number of threads used for parallel regions that do
-not use the clause @code{num_threads}.
+Return the maximal number of threads used for the current parallel region
+that does not use the clause @code{num_threads}.
 
 @item @emph{C/C++}:
 @multitable @columnfractions .20 .80
@@ -217,10 +334,10 @@ not use the clause @code{num_threads}.
 @end multitable
 
 @item @emph{See also}:
-@ref{omp_set_num_threads}, @ref{omp_set_dynamic}
+@ref{omp_set_num_threads}, @ref{omp_set_dynamic}, @ref{omp_get_thread_limit}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.3.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.3.
 @end table
 
 
@@ -252,7 +369,7 @@ disabled by default.
 @ref{omp_set_nested}, @ref{OMP_NESTED}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.10.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.10.
 @end table
 
 
@@ -274,7 +391,7 @@ Returns the number of processors online.
 @end multitable
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.5.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.5.
 @end table
 
 
@@ -307,7 +424,92 @@ one thread per CPU online is used.
 @ref{omp_get_max_threads}, @ref{omp_set_num_threads}, @ref{OMP_NUM_THREADS}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.2.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.2.
+@end table
+
+
+
+@node omp_get_schedule
+@section @code{omp_get_schedule} -- Obtain the runtime scheduling method
+@table @asis
+@item @emph{Description}:
+Obtain runtime the scheduling method. The @var{kind} argument will be
+set to the value @code{omp_sched_static}, @code{omp_sched_dynamic},
+@code{opm_sched_guided} or @code{auto}. The second argument, @var{modifier},
+is set to the chunk size.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{omp_schedule(omp_sched_t * kind, int *modifier);}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{subroutine omp_schedule(kind, modifier)}
+@item                   @tab @code{integer(kind=omp_sched_kind) kind}
+@item                   @tab @code{integer modifier}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_set_schedule}, @ref{OMP_SCHEDULE}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.12.
+@end table
+
+
+
+@node omp_get_team_size
+@section @code{omp_get_team_size} -- Number of threads in a team
+@table @asis
+@item @emph{Description}:
+This function returns the number of threads in a thread team to which
+either the current thread or its ancestor belongs. For values of @var{level}
+outside zero to @code{omp_get_level} -1 is returned; if @var{level} is zero
+1 is returned and for @code{omp_get_level} the result is identical
+to @code{omp_get_num_threads}.
+
+@item @emph{C/C++}:
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_get_time_size(int level);}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{integer function omp_get_team_size(level)}
+@item                   @tab @code{integer level}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_num_threads}, @ref{omp_get_level}, @ref{omp_get_ancestor_thread_num}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.18.
+@end table
+
+
+
+@node omp_get_thread_limit
+@section @code{omp_get_thread_limit} -- Maximal number of threads
+@table @asis
+@item @emph{Description}:
+Return the maximal number of threads of the program.
+
+@item @emph{C/C++}:
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_get_thread_limit();}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{integer function omp_get_thread_limit()}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_max_threads}, @ref{OMP_THREAD_LIMIT}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.13.
 @end table
 
 
@@ -316,9 +518,10 @@ one thread per CPU online is used.
 @section @code{omp_get_thread_num} -- Current thread ID
 @table @asis
 @item @emph{Description}:
-Unique thread identification number. In a sequential parts of the program, 
-@code{omp_get_thread_num} always returns 0. In parallel regions the return
-value varies from 0 to @code{omp_get_max_threads}-1 inclusive. The return 
+Unique thread identification number within the current team.
+In a sequential parts of the program, @code{omp_get_thread_num}
+always returns 0. In parallel regions the return value varies
+from 0 to @code{omp_get_num_threads}-1 inclusive. The return 
 value of the master thread of a team is always 0.
 
 @item @emph{C/C++}:
@@ -332,10 +535,10 @@ value of the master thread of a team is always 0.
 @end multitable
 
 @item @emph{See also}:
-@ref{omp_get_max_threads}
+@ref{omp_get_num_threads}, @ref{omp_get_ancestor_thread_num}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.4.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.4.
 @end table
 
 
@@ -359,7 +562,7 @@ their language-specific counterparts.
 @end multitable
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.6.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.6.
 @end table
 
 
@@ -387,7 +590,33 @@ adjustment of team sizes and @code{false} disables it.
 @ref{OMP_DYNAMIC}, @ref{omp_get_dynamic}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.7.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.7.
+@end table
+
+
+
+@node omp_set_max_active_levels
+@section @code{omp_set_max_active_levels} -- Limits the number of active parallel regions
+@table @asis
+@item @emph{Description}:
+This function limits the maximally allowed number of nested, active parallel regions.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{omp_set_max_active_levels(int max_levels);}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{omp_max_active_levels(max_levels)}
+@item                   @tab @code{integer max_levels}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_max_active_levels}, @ref{omp_get_active_level}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.14.
 @end table
 
 
@@ -416,7 +645,7 @@ dynamic adjustment of team sizes and @code{false} disables it.
 @ref{OMP_NESTED}, @ref{omp_get_nested}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.9.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.9.
 @end table
 
 
@@ -444,7 +673,40 @@ argument of @code{omp_set_num_threads} shall be a positive integer.
 @ref{OMP_NUM_THREADS}, @ref{omp_get_num_threads}, @ref{omp_get_max_threads}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.2.1.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.1.
+@end table
+
+
+
+@node omp_set_schedule
+@section @code{omp_set_schedule} -- Set the runtime scheduling method
+@table @asis
+@item @emph{Description}:
+Sets the runtime scheduling method. The @var{kind} argument can have the
+value @code{omp_sched_static}, @code{omp_sched_dynamic},
+@code{opm_sched_guided} or @code{omp_sched_auto}. Except for
+@code{omp_sched_auto}, the chunk size is set to the value of
+@var{modifier} if positive or to the default value if zero or negative.
+For @code{omp_sched_auto} the @var{modifier} argument is ignored.
+
+@item @emph{C/C++}
+@multitable @columnfractions .20 .80
+@item @emph{Prototype}: @tab @code{int omp_schedule(omp_sched_t * kind, int *modifier);}
+@end multitable
+
+@item @emph{Fortran}:
+@multitable @columnfractions .20 .80
+@item @emph{Interface}: @tab @code{subroutine omp_schedule(kind, modifier)}
+@item                   @tab @code{integer(kind=omp_sched_kind) kind}
+@item                   @tab @code{integer modifier}
+@end multitable
+
+@item @emph{See also}:
+@ref{omp_get_schedule}
+@ref{OMP_SCHEDULE}
+
+@item @emph{Reference}:
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.2.11.
 @end table
 
 
@@ -471,7 +733,7 @@ an unlocked state.
 @ref{omp_destroy_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.1.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.1.
 @end table
 
 
@@ -500,7 +762,7 @@ a deadlock occurs.
 @ref{omp_init_lock}, @ref{omp_test_lock}, @ref{omp_unset_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.3.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.3.
 @end table
 
 
@@ -512,7 +774,7 @@ a deadlock occurs.
 Before setting a simple lock, the lock variable must be initialized by 
 @code{omp_init_lock}. Contrary to @code{omp_set_lock}, @code{omp_test_lock} 
 does not block if the lock is not available. This function returns 
-@code{true} upon success,@code{false} otherwise. Here, @code{true} and 
+@code{true} upon success, @code{false} otherwise. Here, @code{true} and 
 @code{false} represent their language-specific counterparts.
 
 @item @emph{C/C++}:
@@ -531,7 +793,7 @@ does not block if the lock is not available. This function returns
 @ref{omp_init_lock}, @ref{omp_set_lock}, @ref{omp_set_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.5.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.5.
 @end table
 
 
@@ -561,7 +823,7 @@ again, set the lock for itself.
 @ref{omp_set_lock}, @ref{omp_test_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.4.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.4.
 @end table
 
 
@@ -588,7 +850,7 @@ in the unlocked state.
 @ref{omp_init_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.2.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.2.
 @end table
 
 
@@ -615,7 +877,7 @@ an unlocked state and the nesting count is set to zero.
 @ref{omp_destroy_nest_lock}
 
 @item @emph{Reference}:
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.1.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.1.
 @end table
 
 
@@ -643,7 +905,7 @@ nesting count for the lock in incremented.
 @ref{omp_init_nest_lock}, @ref{omp_unset_nest_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.3.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.3.
 @end table
 
 
@@ -675,7 +937,7 @@ is returned. Otherwise, the return value equals zero.
 @ref{omp_init_lock}, @ref{omp_set_lock}, @ref{omp_set_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.5.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.5.
 @end table
 
 
@@ -705,7 +967,7 @@ one of them is chosen to, again, set the lock for itself.
 @ref{omp_set_nest_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.4.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.4.
 @end table
 
 
@@ -732,7 +994,7 @@ in the unlocked state and its nesting count must equal zero.
 @ref{omp_init_lock}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.3.2.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.3.2.
 @end table
 
 
@@ -758,7 +1020,7 @@ successive clock ticks.
 @ref{omp_get_wtime}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.4.2.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.4.2.
 @end table
 
 
@@ -786,7 +1048,7 @@ the seconds since the Epoch (00:00:00 UTC, January 1, 1970) are returned.
 @ref{omp_get_wtick}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 3.4.1.
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 3.4.1.
 @end table
 
 
@@ -798,25 +1060,30 @@ the seconds since the Epoch (00:00:00 UTC, January 1, 1970) are returned.
 @node Environment Variables
 @chapter Environment Variables
 
-The variables @env{OMP_DYNAMIC}, @env{OMP_NESTED}, @env{OMP_NUM_THREADS} and 
-@env{OMP_SCHEDULE} are defined by section 4 of the OpenMP specifications in 
-version 2.5, while @env{GOMP_CPU_AFFINITY} and @env{GOMP_STACKSIZE} are GNU 
+The variables @env{OMP_DYNAMIC}, @env{OMP_MAX_ACTIVE_LEVELS},
+@env{OMP_NESTED}, @env{OMP_NUM_THREADS}, @env{OMP_SCHEDULE},
+@env{OMP_STACKSIZE},@env{OMP_THREAD_LIMIT} and @env{OMP_WAIT_POLICY}
+are defined by section 4 of the OpenMP specifications in version 3.0,
+while @env{GOMP_CPU_AFFINITY} and @env{GOMP_STACKSIZE} are GNU 
 extensions.
 
 @menu
-* OMP_DYNAMIC::        Dynamic adjustment of threads
-* OMP_NESTED::         Nested parallel regions
-* OMP_NUM_THREADS::    Specifies the number of threads to use
-* OMP_SCHEDULE::       How threads are scheduled
-* GOMP_CPU_AFFINITY::  Bind threads to specific CPUs
-* GOMP_STACKSIZE::     Set default thread stack size
+* OMP_DYNAMIC::           Dynamic adjustment of threads
+* OMP_MAX_ACTIVE_LEVELS:: Set the maximal number of nested parallel regions
+* OMP_NESTED::            Nested parallel regions
+* OMP_NUM_THREADS::       Specifies the number of threads to use
+* OMP_STACKSIZE::         Set default thread stack size
+* OMP_SCHEDULE::          How threads are scheduled
+* OMP_THREAD_LIMIT::      Set the maximal number of threads
+* OMP_WAIT_POLICY::       How waiting threads are handled
+* GOMP_CPU_AFFINITY::     Bind threads to specific CPUs
+* GOMP_STACKSIZE::        Set default thread stack size
 @end menu
 
 
 @node OMP_DYNAMIC
 @section @env{OMP_DYNAMIC} -- Dynamic adjustment of threads
 @cindex Environment Variable
-@cindex Implementation specific setting
 @table @asis
 @item @emph{Description}:
 Enable or disable the dynamic adjustment of the number of threads 
@@ -828,7 +1095,25 @@ disabled by default.
 @ref{omp_set_dynamic}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 4.3
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.3
+@end table
+
+
+
+@node OMP_MAX_ACTIVE_LEVELS
+@section @env{OMP_MAX_ACTIVE_LEVELS} -- Set the maximal number of nested parallel regions
+@cindex Environment Variable
+@table @asis
+@item @emph{Description}:
+Specifies the initial value for the maximal number of nested parallel
+regions. The value of this variable shall be positive integer.
+If undefined, the number of active levels is unlimited.
+
+@item @emph{See also}:
+@ref{omp_set_max_active_levels}
+
+@item @emph{Reference}: 
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.7
 @end table
 
 
@@ -848,7 +1133,7 @@ regions are disabled by default.
 @ref{omp_set_nested}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 4.4
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.4
 @end table
 
 
@@ -867,7 +1152,7 @@ per CPU online is used.
 @ref{omp_set_num_threads}
 
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, section 4.2
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.2
 @end table
 
 
@@ -880,29 +1165,98 @@ per CPU online is used.
 @item @emph{Description}:
 Allows to specify @code{schedule type} and @code{chunk size}. 
 The value of the variable shall have the form: @code{type[,chunk]} where
-@code{type} is one of @code{static}, @code{dynamic} or @code{guided}. 
-The optional @code{chunk size} shall be a positive integer. If undefined,
+@code{type} is one of @code{static}, @code{dynamic}, @code{guided} or @code{auto}
+The optional @code{chunk} size shall be a positive integer. If undefined,
 dynamic scheduling and a chunk size of 1 is used.
 
+@item @emph{See also}:
+@ref{omp_set_schedule}
+
 @item @emph{Reference}: 
-@uref{http://www.openmp.org/, OpenMP specifications v2.5}, sections 2.5.1 and 4.1
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, sections 2.5.1 and 4.1
 @end table
 
 
 
-@node GOMP_CPU_AFFINITY
-@section @env{GOMP_CPU_AFFINITY} -- Bind threads to specific CPUs
+@node OMP_STACKSIZE
+@section @env{OMP_STACKSIZE} -- Set default thread stack size
 @cindex Environment Variable
 @table @asis
 @item @emph{Description}:
-A patch for this extension has been submitted, but was not yet applied at the
-time of writing.
+Set the default thread stack size in kilobytes, unless the number
+is suffixed by @code{B}, @code{K}, @code{M} or @code{G}, in which
+case the size is, respectively, in bytes, kilobytes, megabytes
+or gigabytes. This is different from @code{pthread_attr_setstacksize}
+which gets the number of bytes as an argument. If the stacksize can not
+be set due to system constraints, an error is reported and the initial
+stacksize is left unchanged. If undefined, the stack size is system
+dependent.
 
 @item @emph{Reference}: 
-@uref{http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00982.html, 
-GCC Patches Mailinglist}
-@uref{http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01133.html,
-GCC Patches Mailinglist}
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, sections 4.5
+@end table
+
+
+
+@node OMP_THREAD_LIMIT
+@section @env{OMP_THREAD_LIMIT} -- Set the maximal number of threads
+@cindex Environment Variable
+@table @asis
+@item @emph{Description}:
+Specifies the number of threads to use for the whole program. The
+value of this variable shall be positive integer. If undefined,
+the number of threads is not limited.
+
+@item @emph{See also}:
+@ref{OMP_NUM_THREADS}
+@ref{omp_get_thread_limit}
+
+@item @emph{Reference}: 
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, section 4.8
+@end table
+
+
+
+@node OMP_WAIT_POLICY
+@section @env{OMP_WAIT_POLICY} -- How waiting threads are handled
+@cindex Environment Variable
+@table @asis
+@item @emph{Description}:
+Specifies whether waiting threads should be active or passive. If
+the value is @code{PASSIVE}, waiting threads should not consume CPU
+power while waiting; while the value is @code{ACTIVE} specifies that
+they should.
+
+@item @emph{Reference}: 
+@uref{http://www.openmp.org/, OpenMP specifications v3.0}, sections 4.6
+@end table
+
+
+
+@node GOMP_CPU_AFFINITY
+@section @env{GOMP_CPU_AFFINITY} -- Bind threads to specific CPUs
+@cindex Environment Variable
+@table @asis
+@item @emph{Description}:
+Binds threads to specific CPUs. The variable should contain a space- or
+comma-separated list of CPUs. This list may contain different kind of 
+entries: either single CPU numbers in any order, a range of CPUs (M-N) 
+or a range with some stride (M-N:S). CPU numbers are zero based. For example,
+@code{GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"} will bind the initial thread
+to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to 
+CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 10, 12,
+and 14 respectively and then start assigning back from the beginning of
+the list. @code{GOMP_CPU_AFFINITY=0} binds all threads to CPU 0.
+
+There is no GNU OpenMP library routine to determine whether a CPU affinity 
+specification is in effect. As a workaround, language-specific library 
+functions, e.g., @code{getenv} in C or @code{GET_ENVIRONMENT_VARIABLE} in 
+Fortran, may be used to query the setting of the @code{GOMP_CPU_AFFINITY} 
+environment variable. A defined CPU affinity on startup cannot be changed 
+or disabled during the runtime of the application.
+
+If this environment variable is omitted, the host system will handle the 
+assignment of threads to CPUs. 
 @end table
 
 
@@ -913,12 +1267,15 @@ GCC Patches Mailinglist}
 @cindex Implementation specific setting
 @table @asis
 @item @emph{Description}:
-Set the default thread stack size in kilobytes. This is in opposition 
-to @code{pthread_attr_setstacksize} which gets the number of bytes as an 
+Set the default thread stack size in kilobytes. This is different from
+@code{pthread_attr_setstacksize} which gets the number of bytes as an 
 argument. If the stacksize can not be set due to system constraints, an 
 error is reported and the initial stacksize is left unchanged. If undefined,
 the stack size is system dependent.
 
+@item @emph{See also}:
+@ref{GOMP_STACKSIZE}
+
 @item @emph{Reference}: 
 @uref{http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html, 
 GCC Patches Mailinglist},