diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-03 11:03:23 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-03 11:03:23 +0300 |
commit | 04a9d5a8284a656ec64c4c82a2910c807e47e260 (patch) | |
tree | c87c4b5c2f1bc0a34509cf1f555b18cf13752cbb /accel-pptpd/triton/triton.c | |
parent | e51a8e8a93cd6e29c9d5bc28e1e634fa6dae813d (diff) | |
download | accel-ppp-04a9d5a8284a656ec64c4c82a2910c807e47e260.tar.gz accel-ppp-04a9d5a8284a656ec64c4c82a2910c807e47e260.zip |
core: update statistics calculations
Diffstat (limited to 'accel-pptpd/triton/triton.c')
-rw-r--r-- | accel-pptpd/triton/triton.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c index 2b83b6e4..08d33a8e 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); } |