From 63d57f82c6d668db2d60c1ab7efa3b312058c1d2 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Wed, 28 Apr 2021 07:54:57 +0800 Subject: [PATCH] set thread name OK --- src/common_define.h | 4 ++++ src/sched_thread.c | 5 ----- src/thread_pool.c | 5 ----- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/common_define.h b/src/common_define.h index 0e777cd..3b2c3a2 100644 --- a/src/common_define.h +++ b/src/common_define.h @@ -59,6 +59,10 @@ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind); #include "_os_define.h" +#ifdef OS_LINUX +#include +#endif + #ifdef OS_LINUX #ifndef PTHREAD_MUTEX_ERRORCHECK #define PTHREAD_MUTEX_ERRORCHECK PTHREAD_MUTEX_ERRORCHECK_NP diff --git a/src/sched_thread.c b/src/sched_thread.c index 2205d1e..cfd291e 100644 --- a/src/sched_thread.c +++ b/src/sched_thread.c @@ -17,11 +17,6 @@ #include #include #include - -#ifdef OS_LINUX -#include -#endif - #include "shared_func.h" #include "pthread_func.h" #include "logger.h" diff --git a/src/thread_pool.c b/src/thread_pool.c index 44df87a..2c8a47d 100644 --- a/src/thread_pool.c +++ b/src/thread_pool.c @@ -18,11 +18,6 @@ #include #include #include - -#ifdef OS_LINUX -#include -#endif - #include "sched_thread.h" #include "fc_memory.h" #include "thread_pool.h"