fix: compile error in lower gcc version

This commit is contained in:
Shengliang Guan 2025-02-17 11:30:46 +08:00
parent a0090b5cdf
commit acf6a6e966
1 changed files with 4 additions and 11 deletions

View File

@ -78,11 +78,6 @@ void taos_block_sigalrm(void) {
#include <sys/syscall.h> #include <sys/syscall.h>
#include <unistd.h> #include <unistd.h>
static void taosDeleteTimer(void *tharg) {
timer_t *pTimer = tharg;
TAOS_SKIP_ERROR(timer_delete(*pTimer));
}
static TdThread timerThread; static TdThread timerThread;
static timer_t timerId; static timer_t timerId;
static volatile bool stopTimer = false; static volatile bool stopTimer = false;
@ -114,8 +109,6 @@ static void *taosProcessAlarmSignal(void *tharg) {
return NULL; return NULL;
} }
taosThreadCleanupPush(taosDeleteTimer, &timerId);
do { do {
struct itimerspec ts; struct itimerspec ts;
ts.it_value.tv_sec = 0; ts.it_value.tv_sec = 0;
@ -141,7 +134,7 @@ static void *taosProcessAlarmSignal(void *tharg) {
} }
} while (0); } while (0);
taosThreadCleanupPop(1); timer_delete(timerId);
return NULL; return NULL;
} }