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

Paolo Bonzini <[email protected]>
Newsgroups org.nongnu.qemu-rust,org.nongnu.qemu-devel
Message-ID <[email protected]>
On 1/8/26 18:03, Daniel P. Berrangé wrote:
> +static __thread char namebuf[PTHREAD_MAX_NAMELEN_NP];

... you can instead of the previous patch, add a constructor here that 
just sets namebuf to "main" with strcpy.

For Windows on the other hand it should be okay to call 
SetThreadDescription if available.

Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.