extend.texi: Document __atomic_test_and_set and __atomic_clear.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 10 Nov 2011 22:46:25 +0000 (22:46 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Thu, 10 Nov 2011 22:46:25 +0000 (22:46 +0000)
2011-11-10  Andrew MacLeod  <amacleod@redhat.com>

* doc/extend.texi: Document __atomic_test_and_set and __atomic_clear.

From-SVN: r181273

gcc/ChangeLog
gcc/doc/extend.texi

index 1f8a56af363902e0046b53f5ac4c9e74566da5bb..5af6961bd1871598defe80f54217bcda8fcab0dd 100644 (file)
@@ -1,3 +1,7 @@
+2011-11-10  Andrew MacLeod  <amacleod@redhat.com>
+
+       * doc/extend.texi: Document __atomic_test_and_set and __atomic_clear.
+
 2011-11-10  Andrew MacLeod  <amacleod@redhat.com>
 
        PR middle-end/51038
index c7e8ede9cb06e61281ae5d51c39055b129da1e79..15238c1b39ef8900aa5ccc080d1168db48d05e2b 100644 (file)
@@ -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