Commit 1aabd05e by Andrew MacLeod Committed by Andrew Macleod

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
parent 99c18869
2011-11-10 Andrew MacLeod <amacleod@redhat.com> 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 PR middle-end/51038
* builtins.c (expand_builtin_atomic_clear): New. Expand atomic_clear. * builtins.c (expand_builtin_atomic_clear): New. Expand atomic_clear.
(expand_builtin_atomic_test_and_set): New. Expand atomic test_and_set. (expand_builtin_atomic_test_and_set): New. Expand atomic test_and_set.
...@@ -7002,6 +7002,27 @@ All memory models are valid. ...@@ -7002,6 +7002,27 @@ All memory models are valid.
@end deftypefn @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) @deftypefn {Built-in Function} void __atomic_thread_fence (int memmodel)
This built-in function acts as a synchronization fence between threads This built-in function acts as a synchronization fence between threads
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment