[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 {
|
typedef struct SSqlObj {
|
||||||
void *signature;
|
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;
|
STscObj *pTscObj;
|
||||||
int64_t rpcRid;
|
int64_t rpcRid;
|
||||||
__async_cb_func_t fp;
|
__async_cb_func_t fp;
|
||||||
|
|
|
@ -2578,11 +2578,7 @@ bool tscSetSqlOwner(SSqlObj* pSql) {
|
||||||
SSqlRes* pRes = &pSql->res;
|
SSqlRes* pRes = &pSql->res;
|
||||||
|
|
||||||
// set the sql object owner
|
// set the sql object owner
|
||||||
#ifdef __APPLE__
|
|
||||||
pthread_t threadId = (pthread_t)taosGetSelfPthreadId();
|
|
||||||
#else // __APPLE__
|
|
||||||
int64_t threadId = taosGetSelfPthreadId();
|
int64_t threadId = taosGetSelfPthreadId();
|
||||||
#endif // __APPLE__
|
|
||||||
if (atomic_val_compare_exchange_64(&pSql->owner, 0, threadId) != 0) {
|
if (atomic_val_compare_exchange_64(&pSql->owner, 0, threadId) != 0) {
|
||||||
pRes->code = TSDB_CODE_QRY_IN_EXEC;
|
pRes->code = TSDB_CODE_QRY_IN_EXEC;
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue