From 6924adf1aec07b12fbc164869b446ac68598b343 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 27 Jul 2024 14:56:30 +0800 Subject: [PATCH] fix(util):not use taos_system_error macro, otherwise, the return code check will fail. --- source/os/src/osThread.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/os/src/osThread.c b/source/os/src/osThread.c index 133623ca3c..cf1fef71c2 100644 --- a/source/os/src/osThread.c +++ b/source/os/src/osThread.c @@ -767,7 +767,7 @@ int32_t taosThreadSetSpecific(TdThreadKey key, const void *value) { terrno = TAOS_SYSTEM_ERROR(code); return terrno; } - return code; + return code; } int32_t taosThreadSpinDestroy(TdThreadSpinlock *lock) { @@ -779,7 +779,7 @@ int32_t taosThreadSpinDestroy(TdThreadSpinlock *lock) { terrno = TAOS_SYSTEM_ERROR(code); return terrno; } - return code; + return code; #endif } @@ -794,7 +794,7 @@ int32_t taosThreadSpinInit(TdThreadSpinlock *lock, int32_t pshared) { terrno = TAOS_SYSTEM_ERROR(code); return terrno; } - return code; + return code; #endif } @@ -807,7 +807,7 @@ int32_t taosThreadSpinLock(TdThreadSpinlock *lock) { terrno = TAOS_SYSTEM_ERROR(code); return terrno; } - return code; + return code; #endif } @@ -818,9 +818,9 @@ int32_t taosThreadSpinTrylock(TdThreadSpinlock *lock) { int32_t code = pthread_spin_trylock((pthread_spinlock_t *)lock); if (code) { terrno = TAOS_SYSTEM_ERROR(code); - return terrno; + return code; } - return code; + return code; #endif } @@ -833,7 +833,7 @@ int32_t taosThreadSpinUnlock(TdThreadSpinlock *lock) { terrno = TAOS_SYSTEM_ERROR(code); return terrno; } - return code; + return code; #endif }