chore: code optimization for mutex
This commit is contained in:
parent
a19cfcd587
commit
fa9afb25e7
|
@ -234,9 +234,7 @@ int32_t taosThreadMutexLock(TdThreadMutex *mutex) {
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
THREAD_PTR_CHECK(mutex)
|
THREAD_PTR_CHECK(mutex)
|
||||||
int result = pthread_mutex_lock(mutex);
|
return pthread_mutex_lock(mutex);
|
||||||
assert(result == 0);
|
|
||||||
return result;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,9 +258,7 @@ int32_t taosThreadMutexUnlock(TdThreadMutex *mutex) {
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
THREAD_PTR_CHECK(mutex)
|
THREAD_PTR_CHECK(mutex)
|
||||||
int result = pthread_mutex_unlock(mutex);
|
return pthread_mutex_unlock(mutex);
|
||||||
assert(result == 0);
|
|
||||||
return result;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue