public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	io-uring Mailing List <io-uring@vger.kernel.org>,
	dr.xiaosa@gmail.com,
	Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Subject: Re: [PATCH liburing v1] barrier: Convert C++ barrier functions into macros
Date: Sat, 13 Sep 2025 22:24:22 +0700	[thread overview]
Message-ID: <20250913152422.GA31788-ammarfaizi2@gnuweeb.org> (raw)
In-Reply-To: <e0559c10-104d-4da8-9f7f-d2ffd73d8df3@acm.org>

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


      reply	other threads:[~2025-09-13 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-13 13:15 [PATCH liburing v1] barrier: Convert C++ barrier functions into macros Ammar Faizi
2025-09-13 14:40 ` Bart Van Assche
2025-09-13 15:24   ` Ammar Faizi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250913152422.GA31788-ammarfaizi2@gnuweeb.org \
    --to=ammarfaizi2@gnuweeb.org \
    --cc=alviro.iskandar@gnuweeb.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=dr.xiaosa@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox