From 7c0c4e60a8dd194f2684f0b7f808d2b293e24069 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sat, 27 Feb 2021 21:56:24 +0800 Subject: [PATCH] [TD-2210] : use LWP tid. remove few darwin-related code. --- src/client/inc/tsclient.h | 2 +- src/client/src/tscUtil.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index 47f4a65442..8f76f812ac 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -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; diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index ca5d8dd055..cfa73b969d 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -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;