summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index efa9d11f2..82dc201d3 100644
--- a/src/config.h
+++ b/src/config.h
@@ -226,4 +226,16 @@ void setproctitle(const char *fmt, ...);
#define USE_ALIGNED_ACCESS
#endif
+/* Define for redis_set_thread_title */
+#ifdef __linux__
+#define redis_set_thread_title(name) pthread_setname_np(pthread_self(), name)
+#else
+#if (defined __NetBSD__ || defined __FreeBSD__ || defined __OpenBSD__)
+#include <pthread_np.h>
+#define redis_set_thread_title(name) pthread_set_name_np(pthread_self(), name)
+#else
+#define redis_set_thread_title(name)
+#endif
+#endif
+
#endif