From 6ed41e2a0cd0c81d4f9f69fe636edaca4869c8da Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 28 Feb 2022 15:20:54 +0800 Subject: [PATCH] minor changes --- source/util/src/tlog.c | 2 +- source/util/src/tthread.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 87e3a41073..d821e0440b 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -14,8 +14,8 @@ */ #define _DEFAULT_SOURCE -#include "tutil.h" #include "tlog.h" +#include "tutil.h" #define LOG_MAX_LINE_SIZE (1000) #define LOG_MAX_LINE_BUFFER_SIZE (LOG_MAX_LINE_SIZE + 10) diff --git a/source/util/src/tthread.c b/source/util/src/tthread.c index 84a255d1d8..f9e28d7b62 100644 --- a/source/util/src/tthread.c +++ b/source/util/src/tthread.c @@ -16,7 +16,6 @@ #define _DEFAULT_SOURCE #include "tthread.h" -// create new thread pthread_t* taosCreateThread(void* (*__start_routine)(void*), void* param) { pthread_t* pthread = (pthread_t*)malloc(sizeof(pthread_t)); pthread_attr_t thattr; @@ -32,7 +31,6 @@ pthread_t* taosCreateThread(void* (*__start_routine)(void*), void* param) { return pthread; } -// destory thread bool taosDestoryThread(pthread_t* pthread) { if (pthread == NULL) return false; if (taosThreadRunning(pthread)) { @@ -44,7 +42,6 @@ bool taosDestoryThread(pthread_t* pthread) { return true; } -// thread running return true bool taosThreadRunning(pthread_t* pthread) { if (pthread == NULL) return false; int32_t ret = pthread_kill(*pthread, 0);