From a1124d71dafdea11c4869e2a45ff9c3e105e3592 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Wed, 29 Dec 2010 19:09:45 +0300 Subject: fix statistics calculation --- accel-pptpd/triton/md.c | 4 +++- accel-pptpd/triton/timer.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'accel-pptpd') diff --git a/accel-pptpd/triton/md.c b/accel-pptpd/triton/md.c index d8453896..84073d05 100644 --- a/accel-pptpd/triton/md.c +++ b/accel-pptpd/triton/md.c @@ -140,8 +140,10 @@ void __export triton_md_unregister_handler(struct triton_md_handler_t *ud) spin_lock(&h->ctx->lock); h->ud = NULL; list_del(&h->entry); - if (h->pending) + if (h->pending) { list_del(&h->entry2); + __sync_sub_and_fetch(&triton_stat.md_handler_pending, 1); + } spin_unlock(&h->ctx->lock); sched_yield(); diff --git a/accel-pptpd/triton/timer.c b/accel-pptpd/triton/timer.c index 4e37754c..7d117308 100644 --- a/accel-pptpd/triton/timer.c +++ b/accel-pptpd/triton/timer.c @@ -202,8 +202,10 @@ void __export triton_timer_del(struct triton_timer_t *ud) spin_lock(&t->ctx->lock); t->ud = NULL; list_del(&t->entry); - if (t->pending) + if (t->pending) { list_del(&t->entry2); + __sync_sub_and_fetch(&triton_stat.timer_pending, 1); + } spin_unlock(&t->ctx->lock); sched_yield(); -- cgit v1.2.3