Set posix thread name for debug build (#3657)

This commit is contained in:
Benbuck Nason 2024-07-29 16:50:34 -07:00 committed by GitHub
parent 3b56e7c607
commit a9cd8ba87a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,6 +48,13 @@ os_thread_wrapper(void *arg)
#endif
#ifdef OS_ENABLE_WAKEUP_BLOCKING_OP
os_end_blocking_op();
#endif
#if BH_DEBUG != 0
#if defined __APPLE__
pthread_setname_np("wamr");
#else
pthread_setname_np(pthread_self(), "wamr");
#endif
#endif
start_func(thread_arg);
#ifdef OS_ENABLE_HW_BOUND_CHECK