Daniel P. Berrangé <[email protected]> writes: > This will be used to include the thread name in error reports > in a later patch. It returns a const string stored in a thread > local to avoid memory allocation when it is called repeatedly > in a single thread. The thread name should be set at the very > start of the thread execution, which is the case when using > qemu_thread_create. > > Signed-off-by: Daniel P. Berrangé <[email protected]> > --- > include/qemu/thread.h | 1 + > meson.build | 21 +++++++++++++++++ > util/qemu-thread-posix.c | 33 ++++++++++++++++++++++++++- > util/qemu-thread-win32.c | 49 ++++++++++++++++++++++++++++++++++++---- > 4 files changed, 99 insertions(+), 5 deletions(-)
Tempted to store the thread name in TLS and call it a day.
