OSDN Git Service

win32: set threads name
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 13 Sep 2022 17:53:20 +0000 (21:53 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 12 Oct 2022 15:21:31 +0000 (19:21 +0400)
commit4db99c9d9cb6ab6290f14609e23d079219102742
tree8a74ab3f0ae33072917fbe485c1f6680604469fe
parentab44ea1059242ff2dbbde44e94468f6c6e5f87be
win32: set threads name

As described in:
https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2022

SetThreadDescription() is available since Windows 10, version 1607 and
in some versions only by "Run Time Dynamic Linking". Its declaration is
not yet in mingw, so we lookup the function the same way glib does.

Tested with Visual Studio Community 2022 debugger.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
util/qemu-thread-win32.c