Re: [PATCH v5 08/24] util: add API to fetch the current thread name

Paolo Bonzini <[email protected]> Tue, 13 Jan 2026 16:49:53 +0100
Newsgroups org.nongnu.qemu-rust,org.nongnu.qemu-devel
Message-ID <CABgObfYdw9y3621wHkBT+htB8cQ=OsUMdBFJYEoJiuaDELLzUw@mail.gmail.com>
On Tue, Jan 13, 2026 at 2:00 PM Markus Armbruster <[email protected]> wrote:
> > > Tempted to store the thread name in TLS and call it a day.
> >
> > Using the official APIs in this way ensures that the thread name is
> > visible outside QEMU. For example when debugging in GDB, which IMHO
> > is an important benefit.
>
> I didn't mean to suggest not to set the "official" thread name.
>
> This patch retrieves the "official" thread name back.  Takes a bit of
> system-specific code, including Meson magic.  We could instead hold on
> to our own copy, and just use that.

Yes, I think that's what we're going to do anyway due to my remark on
patch 7/24.

Paolo