On 06/20/2013 06:20 AM, Andi Kleen wrote:
> From: Andi Kleen <[email protected]>
>
> Document that __atomic_clear and __atomic_test_and_set should
> only be used with bool.
>
> gcc/:
> 2013-06-13 Andi Kleen <[email protected]>
>
> * doc/extend.texi: Document that __atomic_clear and
> __atomic_test_and_set should only be used with bool.
> ---
> gcc/doc/extend.texi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
> index 1e1f8b3..aa3abef 100644
> --- a/gcc/doc/extend.texi
> +++ b/gcc/doc/extend.texi
> @@ -7438,6 +7438,8 @@ This built-in function performs an atomic test-and-set
> operation on
> the byte at @code{*@var{ptr}}. The byte is set to some implementation
> defined nonzero ``set'' value and the return value is @code{true} if and only
> if the previous contents were ``set''.
> +It should be only used for operands of type bool or atomic_flag. For
> +other types only part of the value may be set.
@code{bool}. We have no definition for atomic_flag. Perhaps just @code{char}
for now?
> +It should be only used for operands of type bool or atomic_flag and
Same.
> +in conjunction with __atomic_test_and_set.
@code{__atomic_test_and_set}.
r~