From: sh Date: Fri, 18 Jan 2019 08:38:06 +0000 (+0000) Subject: Document atomic fetch and nand X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=597c6d15f881785b3decf4a6a08a6cf64b04be47;p=thirdparty%2Fgcc.git Document atomic fetch and nand Copy code example for fetch and nand from "Legacy __sync Built-in Functions for Atomic Memory Access" to "Built-in Functions for Memory Model Aware Atomic Operations". gcc/ * doc/extend.texi (Built-in Functions for Memory Model Aware Atomic Operations): Document atomic fetch and nand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268062 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a18cf80ee4d..9018b8f00990 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-01-18 Sebastian Huber + + * doc/extend.texi (Built-in Functions for Memory Model Aware + Atomic Operations): Document atomic fetch and nand. + 2019-01-18 Martin Liska Richard Biener diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index ebd564891764..95d22ac1e3cf 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -11017,6 +11017,7 @@ they are not scaled by the size of the type to which the pointer points. @smallexample @{ *ptr @var{op}= val; return *ptr; @} +@{ *ptr = ~(*ptr & val); return *ptr; @} // nand @end smallexample The object pointed to by the first argument must be of integer or pointer @@ -11038,6 +11039,7 @@ the type to which the pointer points. @smallexample @{ tmp = *ptr; *ptr @var{op}= val; return tmp; @} +@{ tmp = *ptr; *ptr = ~(*ptr & val); return tmp; @} // nand @end smallexample The same constraints on arguments apply as for the corresponding