redis_set_thread_title support for Haiku. (#8060)

This commit is contained in:
David CARLIER 2020-11-23 14:14:33 +00:00 committed by GitHub
parent 0963edbc65
commit f16b52cb7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,6 +241,9 @@ void setproctitle(const char *fmt, ...);
#elif defined __NetBSD__
#include <pthread.h>
#define redis_set_thread_title(name) pthread_setname_np(pthread_self(), "%s", name)
#elif defined __HAIKU__
#include <kernel/OS.h>
#define redis_set_thread_title(name) rename_thread(find_thread(0), name)
#else
#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
int pthread_setname_np(const char *name);