[TD-2210] <fix>: use LWP tid. remove few darwin-related code.
This commit is contained in:
parent
d05413ca45
commit
7c0c4e60a8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue