This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Improve __atomic_clear/test_and_set documentation


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]