summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authordfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-19 19:36:34 +0000
committerdfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-19 19:36:34 +0000
commitd8020e985bd7595e614e1bfd0ca4afe0d081d664 (patch)
tree1870ec3c5406301ac0a7b30cc09735a2ab28b23e /libgomp
parent7bb1423a251afbd39495b8cb1a569bfa35ee6d12 (diff)
downloadgcc-d8020e985bd7595e614e1bfd0ca4afe0d081d664.tar.gz
2007-04-19 Daniel Franke <franke.daniel@gmail.com>
* libgomp.texi (GOMP_CPU_AFFINITY): Updated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123976 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog4
-rw-r--r--libgomp/libgomp.texi27
2 files changed, 23 insertions, 8 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 8ad5361bfc3..a234aa4d9a8 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-19 Daniel Franke <franke.daniel@gmail.com>
+
+ * libgomp.texi (GOMP_CPU_AFFINITY): Updated.
+
2007-04-16 Matthias Klose <doko@debian.org>
* configure.tgt (i[456]86-*-linux*): Only add ia32 specific
diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi
index c48cf93e089..f92a5da77fd 100644
--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -895,14 +895,25 @@ dynamic scheduling and a chunk size of 1 is used.
@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.
-
-@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}
+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