Skip to content

Commit

Permalink
native thread name
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 9, 2024
1 parent 1f15cf8 commit 0ad765b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cxx_supportlib/oxt/implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,9 @@ thread::make_thread_name(const string &given_name) {

static void
set_native_thread_name(const string &name) {
#if defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__)
#if defined(__linux__)
pthread_setname_np(pthread_self(), name.c_str());
#elif defined(__APPLE__) || defined(__FreeBSD__)
pthread_setname_np(name.c_str());
#endif
}
Expand Down

0 comments on commit 0ad765b

Please sign in to comment.