From 196eae0d9ee0d2d8ca42e96e49d6988313d39f6d Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 15 Mar 2017 21:43:41 +0100 Subject: kern/syscnt: replace the evcnt module The syscnt module supports more generic counters, in addition to atomic access from any context on any architecture. --- kern/work.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kern/work.c') diff --git a/kern/work.c b/kern/work.c index f8e8e340..c55d85d4 100644 --- a/kern/work.c +++ b/kern/work.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +90,7 @@ struct work_pool { struct work_queue queue0; struct work_queue queue1; struct work_thread *manager; - struct evcnt ev_transfer; + struct syscnt sc_transfer; unsigned int cpu; unsigned int max_threads; unsigned int nr_threads; @@ -159,7 +159,7 @@ work_pool_compute_max_threads(unsigned int nr_cpus) static void work_pool_init(struct work_pool *pool, unsigned int cpu, int flags) { - char name[EVCNT_NAME_SIZE]; + char name[SYSCNT_NAME_SIZE]; const char *suffix; unsigned int id, nr_cpus, max_threads; int error; @@ -173,7 +173,7 @@ work_pool_init(struct work_pool *pool, unsigned int cpu, int flags) nr_cpus = 1; suffix = (flags & WORK_PF_HIGHPRIO) ? "h" : ""; snprintf(name, sizeof(name), "work_transfer/%u%s", cpu, suffix); - evcnt_register(&pool->ev_transfer, name); + syscnt_register(&pool->sc_transfer, name); pool->cpu = cpu; } @@ -274,7 +274,7 @@ work_pool_shift_queues(struct work_pool *pool, struct work_queue *old_queue) work_queue_init(&pool->queue0); if (work_queue_nr_works(old_queue) != 0) { - evcnt_inc(&pool->ev_transfer); + syscnt_inc(&pool->sc_transfer); } } -- cgit v1.2.3