aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-04-07 09:04:43 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2025-04-07 09:04:43 +0200
commite46cf20f8c4474cb96b4db4239c8e3bd66248e00 (patch)
tree33d5d3967622b5b9dd4814e579adea50b753c833
parent98351dc6e48dabc02a941872b0aad7f795e665bd (diff)
downloadlanes-e46cf20f8c4474cb96b4db4239c8e3bd66248e00.tar.gz
lanes-e46cf20f8c4474cb96b4db4239c8e3bd66248e00.tar.bz2
lanes-e46cf20f8c4474cb96b4db4239c8e3bd66248e00.zip
Implement THREAD_SETNAME for mingw
Diffstat (limited to '')
-rw-r--r--src/threading.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/threading.cpp b/src/threading.cpp
index 3e594ff..3435075 100644
--- a/src/threading.cpp
+++ b/src/threading.cpp
@@ -449,7 +449,9 @@ void THREAD_SETNAME(std::string_view const& name_)
449{ 449{
450 // exact API to set the thread name is platform-dependant 450 // exact API to set the thread name is platform-dependant
451 // if you need to fix the build, or if you know how to fill a hole, tell me (bnt.germain@gmail.com) so that I can submit the fix in github. 451 // if you need to fix the build, or if you know how to fill a hole, tell me (bnt.germain@gmail.com) so that I can submit the fix in github.
452#if defined PLATFORM_BSD && !defined __NetBSD__ 452#if defined PLATFORM_MINGW
453 pthread_setname_np(pthread_self(), name_.data());
454#elif defined PLATFORM_BSD && !defined __NetBSD__
453 pthread_set_name_np(pthread_self(), name_.data()); 455 pthread_set_name_np(pthread_self(), name_.data());
454#elif defined PLATFORM_BSD && defined __NetBSD__ 456#elif defined PLATFORM_BSD && defined __NetBSD__
455 pthread_setname_np(pthread_self(), "%s", (void*) name_.data()); 457 pthread_setname_np(pthread_self(), "%s", (void*) name_.data());