On Sat, Jun 27, 2020 at 11:27 AM Bart Van Assche <bvanassche@xxxxxxx> wrote: > > On 2020-06-26 22:55, Hrvoje Zeba wrote: > > Since b9c0bf79aa8, liburing.h doesn't compile with C++ compilers. C++ > > provides it's own <atomic> interface and <stdatomic.h> can't be used. This > > is a minimal change to use <atomic> variants where needed. > > I was not aware that liburing supports C++ compilers? > Why is this there then? https://git.kernel.dk/cgit/liburing/tree/src/include/liburing.h#n6 > > struct io_uring_cq { > > - unsigned *khead; > > - unsigned *ktail; > > + atomic_uint *khead; > > + atomic_uint *ktail; > > I think this is the wrong way to make liburing again compatible with > C++ compilers. Changing these data types causes all dereferences of > these pointers to be translated by the compiler into sequentially > consistent atomic instructions. I expect this patch to have a > negative impact on the performance of liburing. > Any suggestions?