Add a simple 'intrcnt_add' function that other MD code can use to add a
single named counter to the interrupt counts without having to fake up an entire interrupt source.
This commit is contained in:
parent
1f70d62298
commit
21bc8faa44
@ -286,6 +286,17 @@ intrcnt_register(struct intsrc *is)
|
||||
is->is_straycount = &intrcnt[is->is_index + 1];
|
||||
}
|
||||
|
||||
void
|
||||
intrcnt_add(const char *name, u_long **countp)
|
||||
{
|
||||
|
||||
mtx_lock_spin(&intr_table_lock);
|
||||
*countp = &intrcnt[intrcnt_index];
|
||||
intrcnt_setname(name, intrcnt_index);
|
||||
intrcnt_index++;
|
||||
mtx_unlock_spin(&intr_table_lock);
|
||||
}
|
||||
|
||||
static void
|
||||
intr_init(void *dummy __unused)
|
||||
{
|
||||
|
@ -100,6 +100,7 @@ int intr_register_source(struct intsrc *isrc);
|
||||
int intr_remove_handler(void *cookie);
|
||||
void intr_resume(void);
|
||||
void intr_suspend(void);
|
||||
void intrcnt_add(const char *name, u_long **countp);
|
||||
|
||||
#endif /* !LOCORE */
|
||||
#endif /* _KERNEL */
|
||||
|
Loading…
Reference in New Issue
Block a user