Re: Deprecating arithmetic on std::atomic

2017-04-19 Thread Florian Weimer
On 04/19/2017 07:07 PM, Jonathan Wakely wrote: I know it's a bit late, but I'd like to propose deprecating the libstdc++ extension that allows arithmetic on std::atomic. Currently we make it behave like arithmetic on void*, which is also a GNU extension (https://gcc.gnu.org/onlinedocs/gcc/Pointer

Re: Deprecating arithmetic on std::atomic

2017-04-19 Thread Ville Voutilainen
On 19 April 2017 at 20:07, Jonathan Wakely wrote: > I know it's a bit late, but I'd like to propose deprecating the > libstdc++ extension that allows arithmetic on std::atomic. > Currently we make it behave like arithmetic on void*, which is also a > GNU extension (https://gcc.gnu.org/onlinedocs/g

Deprecating arithmetic on std::atomic

2017-04-19 Thread Jonathan Wakely
I know it's a bit late, but I'd like to propose deprecating the libstdc++ extension that allows arithmetic on std::atomic. Currently we make it behave like arithmetic on void*, which is also a GNU extension (https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html). We also allow arithmetic on types

Re: intrinsic function for the assembly x86 xchg command

2017-04-19 Thread Martin Liška
On 04/07/2017 08:10 PM, Yichao Yu wrote: On Fri, Apr 7, 2017 at 2:08 PM, fab10 <0xfa...@gmail.com> wrote: It would be usefull to develop in gcc an intrinsic function for the assembly x86 instruction xchg to implement a low level mutex. I believe that's what atomic_exchange is lowered to on x86