fix: get a thread id for printing with taosGetPthreadId
This commit is contained in:
parent
00a066443f
commit
f23018e38a
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue