fix(util):not use taos_system_error macro, otherwise, the return code check will fail.
This commit is contained in:
parent
8876b2602d
commit
6924adf1ae
|
@ -767,7 +767,7 @@ int32_t taosThreadSetSpecific(TdThreadKey key, const void *value) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(code);
|
terrno = TAOS_SYSTEM_ERROR(code);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t taosThreadSpinDestroy(TdThreadSpinlock *lock) {
|
int32_t taosThreadSpinDestroy(TdThreadSpinlock *lock) {
|
||||||
|
@ -779,7 +779,7 @@ int32_t taosThreadSpinDestroy(TdThreadSpinlock *lock) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(code);
|
terrno = TAOS_SYSTEM_ERROR(code);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -794,7 +794,7 @@ int32_t taosThreadSpinInit(TdThreadSpinlock *lock, int32_t pshared) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(code);
|
terrno = TAOS_SYSTEM_ERROR(code);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -807,7 +807,7 @@ int32_t taosThreadSpinLock(TdThreadSpinlock *lock) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(code);
|
terrno = TAOS_SYSTEM_ERROR(code);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -818,9 +818,9 @@ int32_t taosThreadSpinTrylock(TdThreadSpinlock *lock) {
|
||||||
int32_t code = pthread_spin_trylock((pthread_spinlock_t *)lock);
|
int32_t code = pthread_spin_trylock((pthread_spinlock_t *)lock);
|
||||||
if (code) {
|
if (code) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(code);
|
terrno = TAOS_SYSTEM_ERROR(code);
|
||||||
return terrno;
|
return code;
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -833,7 +833,7 @@ int32_t taosThreadSpinUnlock(TdThreadSpinlock *lock) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(code);
|
terrno = TAOS_SYSTEM_ERROR(code);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue