minor changes

This commit is contained in:
Shengliang Guan 2022-02-28 15:20:54 +08:00
parent 6799376107
commit 6ed41e2a0c
2 changed files with 1 additions and 4 deletions

View File

@ -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)

View File

@ -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);