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

Function intr_handler_barrier

freebsd/kern/kern_intr.c:760–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760static void
761intr_handler_barrier(struct intr_handler *handler)
762{
763 struct intr_event *ie;
764
765 ie = handler->ih_event;
766 mtx_assert(&ie->ie_lock, MA_OWNED);
767 KASSERT((handler->ih_flags & IH_DEAD) == 0,
768 ("update for a removed handler"));
769
770 if (ie->ie_thread == NULL) {
771 intr_event_barrier(ie);
772 return;
773 }
774 if ((handler->ih_flags & IH_CHANGED) == 0) {
775 handler->ih_flags |= IH_CHANGED;
776 intr_event_schedule_thread(ie);
777 }
778 while ((handler->ih_flags & IH_CHANGED) != 0)
779 msleep(handler, &ie->ie_lock, 0, "ih_barr", 0);
780}
781
782/*
783 * Sleep until an ithread finishes executing an interrupt handler.

Callers 2

Calls 3

mtx_assertFunction · 0.85
intr_event_barrierFunction · 0.85

Tested by

no test coverage detected