MCPcopy Create free account
hub / github.com/F-Stack/f-stack / isrc_add_handler

Function isrc_add_handler

freebsd/kern/subr_intr.c:690–712  ·  view source on GitHub ↗

* Add handler to interrupt source. */

Source from the content-addressed store, hash-verified

688 * Add handler to interrupt source.
689 */
690static int
691isrc_add_handler(struct intr_irqsrc *isrc, const char *name,
692 driver_filter_t filter, driver_intr_t handler, void *arg,
693 enum intr_type flags, void **cookiep)
694{
695 int error;
696
697 if (isrc->isrc_event == NULL) {
698 error = isrc_event_create(isrc);
699 if (error)
700 return (error);
701 }
702
703 error = intr_event_add_handler(isrc->isrc_event, name, filter, handler,
704 arg, intr_priority(flags), flags, cookiep);
705 if (error == 0) {
706 mtx_lock(&isrc_table_lock);
707 intrcnt_updatename(isrc);
708 mtx_unlock(&isrc_table_lock);
709 }
710
711 return (error);
712}
713
714/*
715 * Lookup interrupt controller locked.

Callers 1

intr_setup_irqFunction · 0.85

Calls 5

intr_event_add_handlerFunction · 0.85
intr_priorityFunction · 0.85
mtx_lockFunction · 0.70
intrcnt_updatenameFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected