提交 f23018e3 编写于 作者: B Benguang Zhao

fix: get a thread id for printing with taosGetPthreadId

上级 00a06644
......@@ -380,7 +380,7 @@ int32_t dmRunProc(SProc *proc) {
dError("node:%s, failed to create pthread since %s", proc->name, terrstr());
return -1;
}
dDebug("node:%s, thread:%p is created to consume pqueue", proc->name, (void *)proc->pthread);
dDebug("node:%s, thread:%" PRId64 " is created to consume pqueue", proc->name, taosGetPthreadId(proc->pthread));
}
if (proc->ptype & DND_PROC_CHILD) {
......@@ -389,7 +389,7 @@ int32_t dmRunProc(SProc *proc) {
dError("node:%s, failed to create cthread since %s", proc->name, terrstr());
return -1;
}
dDebug("node:%s, thread:%p is created to consume cqueue", proc->name, (void *)proc->cthread);
dDebug("node:%s, thread:%" PRId64 " is created to consume cqueue", proc->name, taosGetPthreadId(proc->cthread));
}
taosThreadAttrDestroy(&thAttr);
......@@ -399,14 +399,14 @@ int32_t dmRunProc(SProc *proc) {
void dmStopProc(SProc *proc) {
proc->stop = true;
if (taosCheckPthreadValid(proc->pthread)) {
dDebug("node:%s, start to join pthread:%p", proc->name, (void *)proc->pthread);
dDebug("node:%s, start to join pthread:%" PRId64 "", proc->name, taosGetPthreadId(proc->pthread));
tsem_post(&proc->pqueue->sem);
taosThreadJoin(proc->pthread, NULL);
taosThreadClear(&proc->pthread);
}
if (taosCheckPthreadValid(proc->cthread)) {
dDebug("node:%s, start to join cthread:%p", proc->name, (void *)proc->cthread);
dDebug("node:%s, start to join cthread:%" PRId64 "", proc->name, taosGetPthreadId(proc->cthread));
tsem_post(&proc->cqueue->sem);
taosThreadJoin(proc->cthread, NULL);
taosThreadClear(&proc->cthread);
......
......@@ -455,7 +455,7 @@ static int32_t tdRsmaStopExecutor(const SSma *pSma) {
for (int32_t i = 0; i < tsNumOfVnodeRsmaThreads; ++i) {
if (taosCheckPthreadValid(pthread[i])) {
smaDebug("vgId:%d, start to join pthread for rsma:%p", SMA_VID(pSma), (void *)pthread[i]);
smaDebug("vgId:%d, start to join pthread for rsma:%" PRId64 "", SMA_VID(pSma), taosGetPthreadId(pthread[i]));
taosThreadJoin(pthread[i], NULL);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册