diff options
author | Richard Braun <rbraun@sceen.net> | 2017-03-15 21:43:41 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-03-15 21:56:42 +0100 |
commit | 196eae0d9ee0d2d8ca42e96e49d6988313d39f6d (patch) | |
tree | 81d20378edede1e02d8f8f578331848715667877 /kern/llsync.c | |
parent | 0f8c14517212dfd03c5cafcab56ffc7dead18209 (diff) |
kern/syscnt: replace the evcnt module
The syscnt module supports more generic counters, in addition to atomic
access from any context on any architecture.
Diffstat (limited to 'kern/llsync.c')
-rw-r--r-- | kern/llsync.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kern/llsync.c b/kern/llsync.c index 059773f4..0cee270b 100644 --- a/kern/llsync.c +++ b/kern/llsync.c @@ -38,7 +38,6 @@ #include <kern/assert.h> #include <kern/condition.h> #include <kern/cpumap.h> -#include <kern/evcnt.h> #include <kern/init.h> #include <kern/list.h> #include <kern/llsync.h> @@ -50,6 +49,7 @@ #include <kern/printk.h> #include <kern/spinlock.h> #include <kern/sprintf.h> +#include <kern/syscnt.h> #include <kern/work.h> #include <machine/cpu.h> @@ -92,11 +92,11 @@ llsync_setup(void) spinlock_init(&llsync_data.lock); work_queue_init(&llsync_data.queue0); work_queue_init(&llsync_data.queue1); - evcnt_register(&llsync_data.ev_global_checkpoint, + syscnt_register(&llsync_data.sc_global_checkpoint, "llsync_global_checkpoint"); - evcnt_register(&llsync_data.ev_periodic_checkin, + syscnt_register(&llsync_data.sc_periodic_checkin, "llsync_periodic_checkin"); - evcnt_register(&llsync_data.ev_failed_periodic_checkin, + syscnt_register(&llsync_data.sc_failed_periodic_checkin, "llsync_failed_periodic_checkin"); llsync_data.gcid.value = LLSYNC_INITIAL_GCID; @@ -143,7 +143,7 @@ llsync_process_global_checkpoint(void) } llsync_data.gcid.value++; - evcnt_inc(&llsync_data.ev_global_checkpoint); + syscnt_inc(&llsync_data.sc_global_checkpoint); } static void @@ -273,10 +273,10 @@ llsync_report_periodic_event(void) llsync_commit_checkpoint(cpu_id()); } else { if (thread_llsync_in_read_cs()) { - evcnt_inc(&llsync_data.ev_failed_periodic_checkin); + syscnt_inc(&llsync_data.sc_failed_periodic_checkin); } else { cpu_data->gcid = gcid; - evcnt_inc(&llsync_data.ev_periodic_checkin); + syscnt_inc(&llsync_data.sc_periodic_checkin); llsync_commit_checkpoint(cpu_id()); } } |