[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250913152422.GA31788-ammarfaizi2@gnuweeb.org>
Date: Sat, 13 Sep 2025 22:24:22 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Bart Van Assche <bvanassche@....org>
Cc: Jens Axboe <axboe@...nel.dk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
io-uring Mailing List <io-uring@...r.kernel.org>,
dr.xiaosa@...il.com,
Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
Subject: Re: [PATCH liburing v1] barrier: Convert C++ barrier functions into
macros
On Sat, Sep 13, 2025 at 07:40:17AM -0700, Bart Van Assche wrote:
> Converting functions into macros is a step backwards. Please check
> whether removing the "static" keyword from the inline function definitions
> in header files is sufficient to suppress the compiler
> warning about TU-local definitions.
OK, that works. I will send a follow up patch to do that instead.
After further testing, I found a new issue, still related to the "static
inline" problems apart from the barrier:
```
In file included from work.cpp:3:
/usr/include/liburing.h:1808:19: error: ‘int io_uring_wait_cqe(io_uring*, io_uring_cqe**)’ exposes TU-local entity ‘int __io_uring_peek_cqe(io_uring*, io_uring_cqe**, unsigned int*)’
1808 | IOURINGINLINE int io_uring_wait_cqe(struct io_uring *ring,
| ^~~~~~~~~~~~~~~~~
/usr/include/liburing.h:1745:19: note: ‘int __io_uring_peek_cqe(io_uring*, io_uring_cqe**, unsigned int*)’ declared with internal linkage
1745 | static inline int __io_uring_peek_cqe(struct io_uring *ring,
| ^~~~~~~~~~~~~~~~~~~
```
It happens due to commit:
f2b6fb85b79b ("liburing: Don't use `IOURINGINLINE` on private helpers")
I will try to introduce a new macro to make it C++ friendly. Apparently,
replacing "static inline" with "inline" needs to be done everywhere. Not
only in barrier.h.
--
Ammar Faizi
Powered by blists - more mailing lists