提交 6ed41e2a 编写于 作者: S Shengliang Guan

minor changes

上级 67993761
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "tutil.h"
#include "tlog.h" #include "tlog.h"
#include "tutil.h"
#define LOG_MAX_LINE_SIZE (1000) #define LOG_MAX_LINE_SIZE (1000)
#define LOG_MAX_LINE_BUFFER_SIZE (LOG_MAX_LINE_SIZE + 10) #define LOG_MAX_LINE_BUFFER_SIZE (LOG_MAX_LINE_SIZE + 10)
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "tthread.h" #include "tthread.h"
// create new thread
pthread_t* taosCreateThread(void* (*__start_routine)(void*), void* param) { pthread_t* taosCreateThread(void* (*__start_routine)(void*), void* param) {
pthread_t* pthread = (pthread_t*)malloc(sizeof(pthread_t)); pthread_t* pthread = (pthread_t*)malloc(sizeof(pthread_t));
pthread_attr_t thattr; pthread_attr_t thattr;
...@@ -32,7 +31,6 @@ pthread_t* taosCreateThread(void* (*__start_routine)(void*), void* param) { ...@@ -32,7 +31,6 @@ pthread_t* taosCreateThread(void* (*__start_routine)(void*), void* param) {
return pthread; return pthread;
} }
// destory thread
bool taosDestoryThread(pthread_t* pthread) { bool taosDestoryThread(pthread_t* pthread) {
if (pthread == NULL) return false; if (pthread == NULL) return false;
if (taosThreadRunning(pthread)) { if (taosThreadRunning(pthread)) {
...@@ -44,7 +42,6 @@ bool taosDestoryThread(pthread_t* pthread) { ...@@ -44,7 +42,6 @@ bool taosDestoryThread(pthread_t* pthread) {
return true; return true;
} }
// thread running return true
bool taosThreadRunning(pthread_t* pthread) { bool taosThreadRunning(pthread_t* pthread) {
if (pthread == NULL) return false; if (pthread == NULL) return false;
int32_t ret = pthread_kill(*pthread, 0); int32_t ret = pthread_kill(*pthread, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册