diff options
-rw-r--r-- | kern/evcnt.c | 18 | ||||
-rw-r--r-- | kern/evcnt.h | 6 |
2 files changed, 9 insertions, 15 deletions
diff --git a/kern/evcnt.c b/kern/evcnt.c index dbb371a6..3ad19c65 100644 --- a/kern/evcnt.c +++ b/kern/evcnt.c @@ -47,20 +47,16 @@ evcnt_register(struct evcnt *evcnt, const char *name) } void -evcnt_info(struct evcnt *evcnt) +evcnt_info(void) { - if (evcnt == NULL) { - printk("evcnt: name count\n"); + struct evcnt *evcnt; - mutex_lock(&evcnt_mutex); + printk("evcnt: name count\n"); - list_for_each_entry(&evcnt_list, evcnt, node) - printk("evcnt: %-24s %15llu\n", evcnt->name, evcnt->count); - - mutex_unlock(&evcnt_mutex); + mutex_lock(&evcnt_mutex); - return; - } + list_for_each_entry(&evcnt_list, evcnt, node) + printk("evcnt: %-24s %15llu\n", evcnt->name, evcnt->count); - printk("evcnt: name: %s count: %llu\n", evcnt->name, evcnt->count); + mutex_unlock(&evcnt_mutex); } diff --git a/kern/evcnt.h b/kern/evcnt.h index 12deac61..aa49ca2b 100644 --- a/kern/evcnt.h +++ b/kern/evcnt.h @@ -68,10 +68,8 @@ evcnt_inc(struct evcnt *evcnt) } /* - * Display the event counter name and value. - * - * If evcnt is NULL, this function displays all registered counters. + * Display the registered event counters. */ -void evcnt_info(struct evcnt *evcnt); +void evcnt_info(void); #endif /* _KERN_EVCNT_H */ |