Message ID | 20190109063517.849-1-sebastian.huber@embedded-brains.de |
---|---|
State | New |
Headers | show |
Series | Document atomic fetch and nand | expand |
On 1/8/19 11:35 PM, Sebastian Huber wrote: > 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. OK jeff
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7f33be4f29c..f2a61e4c4f8 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -11008,6 +11008,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 @@ -11029,6 +11030,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