提交 a1124d71 编写于 作者: K Kozlov Dmitry

fix statistics calculation

上级 1be76a6d
...@@ -140,8 +140,10 @@ void __export triton_md_unregister_handler(struct triton_md_handler_t *ud) ...@@ -140,8 +140,10 @@ void __export triton_md_unregister_handler(struct triton_md_handler_t *ud)
spin_lock(&h->ctx->lock); spin_lock(&h->ctx->lock);
h->ud = NULL; h->ud = NULL;
list_del(&h->entry); list_del(&h->entry);
if (h->pending) if (h->pending) {
list_del(&h->entry2); list_del(&h->entry2);
__sync_sub_and_fetch(&triton_stat.md_handler_pending, 1);
}
spin_unlock(&h->ctx->lock); spin_unlock(&h->ctx->lock);
sched_yield(); sched_yield();
......
...@@ -202,8 +202,10 @@ void __export triton_timer_del(struct triton_timer_t *ud) ...@@ -202,8 +202,10 @@ void __export triton_timer_del(struct triton_timer_t *ud)
spin_lock(&t->ctx->lock); spin_lock(&t->ctx->lock);
t->ud = NULL; t->ud = NULL;
list_del(&t->entry); list_del(&t->entry);
if (t->pending) if (t->pending) {
list_del(&t->entry2); list_del(&t->entry2);
__sync_sub_and_fetch(&triton_stat.timer_pending, 1);
}
spin_unlock(&t->ctx->lock); spin_unlock(&t->ctx->lock);
sched_yield(); sched_yield();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册