提交 e39f9785 编写于 作者: H Hongze Cheng

delete unused taosTmrStop

上级 52cff8b1
......@@ -29,8 +29,6 @@ void *taosTmrInit(int maxTmr, int resoultion, int longest, char *label);
tmr_h taosTmrStart(void (*fp)(void *, void *), int mseconds, void *param1, void *handle);
void taosTmrStop(tmr_h tmrId);
void taosTmrStopA(tmr_h *timerId);
void taosTmrReset(void (*fp)(void *, void *), int mseconds, void *param1, void *handle, tmr_h *pTmrId);
......
......@@ -368,44 +368,6 @@ tmr_h taosTmrStart(void (*fp)(void *, void *), int mseconds, void *param1, void
return (tmr_h)pObj;
}
void taosTmrStop(tmr_h timerId) {
tmr_obj_t * pObj;
tmr_list_t *pList;
tmr_ctrl_t *pCtrl;
pObj = (tmr_obj_t *)timerId;
if (pObj == NULL) return;
pCtrl = pObj->pCtrl;
if (pCtrl == NULL) return;
if (pthread_mutex_lock(&pCtrl->mutex) != 0)
tmrError("%s mutex lock failed, reason:%s", pCtrl->label, strerror(errno));
if (pObj->timerId == timerId) {
pList = &(pCtrl->tmrList[pObj->index]);
if (pObj->prev) {
pObj->prev->next = pObj->next;
} else {
pList->head = pObj->next;
}
if (pObj->next) {
pObj->next->prev = pObj->prev;
}
pList->count--;
pObj->timerId = NULL;
pCtrl->numOfTmrs--;
tmrTrace("%s %p, timer stopped, fp:%p, tmr_h:%p, total:%d", pCtrl->label, pObj->param1, pObj->fp, pObj,
pCtrl->numOfTmrs);
tmrMemPoolFree(pCtrl->poolHandle, (char *)(pObj));
}
pthread_mutex_unlock(&pCtrl->mutex);
}
void taosTmrStopA(tmr_h *timerId) {
tmr_obj_t * pObj;
tmr_list_t *pList;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册