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:
John Baldwin 2004-12-23 20:34:18 +00:00
parent 1f70d62298
commit 21bc8faa44
2 changed files with 12 additions and 0 deletions

View File

@ -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)
{

View File

@ -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 */