提交 7c0c4e60 编写于 作者: sangshuduo's avatar sangshuduo

[TD-2210] <fix>: use LWP tid. remove few darwin-related code.

上级 d05413ca
......@@ -334,7 +334,7 @@ typedef struct SSubqueryState {
typedef struct SSqlObj {
void *signature;
pthread_t owner; // owner of sql object, by which it is executed
int64_t owner; // owner of sql object, by which it is executed
STscObj *pTscObj;
int64_t rpcRid;
__async_cb_func_t fp;
......
......@@ -2578,11 +2578,7 @@ bool tscSetSqlOwner(SSqlObj* pSql) {
SSqlRes* pRes = &pSql->res;
// set the sql object owner
#ifdef __APPLE__
pthread_t threadId = (pthread_t)taosGetSelfPthreadId();
#else // __APPLE__
int64_t threadId = taosGetSelfPthreadId();
#endif // __APPLE__
if (atomic_val_compare_exchange_64(&pSql->owner, 0, threadId) != 0) {
pRes->code = TSDB_CODE_QRY_IN_EXEC;
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册