aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2011-11-10 22:46:25 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2011-11-10 22:46:25 +0000
commit1aabd05ec017fa10e3a425fff112f81005dd0fe7 (patch)
treefcf4c661d1729f4cfa5bd6f22b12bb73388b1719 /gcc/doc
parent99c18869efe4d723a5c715696b65cd833dfee531 (diff)
downloadgcc-1aabd05ec017fa10e3a425fff112f81005dd0fe7.zip
gcc-1aabd05ec017fa10e3a425fff112f81005dd0fe7.tar.gz
gcc-1aabd05ec017fa10e3a425fff112f81005dd0fe7.tar.bz2
extend.texi: Document __atomic_test_and_set and __atomic_clear.
2011-11-10 Andrew MacLeod <amacleod@redhat.com> * doc/extend.texi: Document __atomic_test_and_set and __atomic_clear. From-SVN: r181273
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index c7e8ede..15238c1 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -7002,6 +7002,27 @@ All memory models are valid.
@end deftypefn
+@deftypefn {Built-in Function} bool __atomic_test_and_set (bool *ptr, int memmodel)
+
+This built-in function performs an atomic test-and-set operation on
+@code{*@var{ptr}}. @code{*@var{ptr}} is set to the value 1 and
+the previous contents are returned.
+
+All memory models are valid.
+
+@end deftypefn
+
+@deftypefn {Built-in Function} void __atomic_clear (bool *ptr, int memmodel)
+
+This built-in function performs an atomic clear operation on
+@code{*@var{ptr}}. After the operation, @code{*@var{ptr}} will contain 0.
+
+The valid memory model variants are
+@code{__ATOMIC_RELAXED}, @code{__ATOMIC_SEQ_CST}, and
+@code{__ATOMIC_RELEASE}.
+
+@end deftypefn
+
@deftypefn {Built-in Function} void __atomic_thread_fence (int memmodel)
This built-in function acts as a synchronization fence between threads