提交 04a9d5a8 编写于 作者: D Dmitry Kozlov

core: update statistics calculations

上级 e51a8e8a
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册