This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] Improve __atomic_clear/test_and_set documentation
- From: Richard Henderson <rth at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Andi Kleen <ak at linux dot intel dot com>
- Date: Thu, 20 Jun 2013 11:04:10 -0700
- Subject: Re: [PATCH 1/2] Improve __atomic_clear/test_and_set documentation
- References: <1371734413-12372-1-git-send-email-andi at firstfloor dot org>
On 06/20/2013 06:20 AM, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Document that __atomic_clear and __atomic_test_and_set should
> only be used with bool.
>
> gcc/:
> 2013-06-13 Andi Kleen <ak@linux.intel.com>
>
> * 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~