From 04a9d5a8284a656ec64c4c82a2910c807e47e260 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 3 Jan 2011 11:03:23 +0300 Subject: core: update statistics calculations --- accel-pptpd/triton/triton.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'accel-pptpd/triton') diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c index 2b83b6e..08d33a8 100644 --- a/accel-pptpd/triton/triton.c +++ b/accel-pptpd/triton/triton.c @@ -365,6 +365,7 @@ void __export triton_context_schedule() log_debug2("ctx %p: enter schedule\n", ctx); __sync_add_and_fetch(&triton_stat.context_sleeping, 1); + __sync_sub_and_fetch(&triton_stat.thread_active, 1); pthread_mutex_lock(&ctx->sleep_lock); while (1) { if (ctx->wakeup) { @@ -382,6 +383,7 @@ void __export triton_context_schedule() } pthread_mutex_unlock(&ctx->sleep_lock); __sync_sub_and_fetch(&triton_stat.context_sleeping, 1); + __sync_add_and_fetch(&triton_stat.thread_active, 1); log_debug2("ctx %p: exit schedule\n", ctx); } -- cgit v1.2.3