Re: [RFC PATCH] Fix usage of stdatomic.h for C++ compilers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

>  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.

Bart.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux