Lines Matching refs:ih

215 	struct intr_handler *ih;
227 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
228 if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 1 <
231 strcat(ie->ie_fullname, ih->ih_name);
235 flags |= ih->ih_flags;
247 ih = CK_SLIST_FIRST(&ie->ie_handlers);
248 missed = strlen(ie->ie_fullname) + strlen(ih->ih_name) + 2 -
251 strcat(ie->ie_fullname, &ih->ih_name[missed]);
602 struct intr_handler *ih, *temp_ih;
610 ih = malloc(sizeof(struct intr_handler), M_ITHREAD, M_WAITOK | M_ZERO);
611 ih->ih_filter = filter;
612 ih->ih_handler = handler;
613 ih->ih_argument = arg;
614 strlcpy(ih->ih_name, name, sizeof(ih->ih_name));
615 ih->ih_event = ie;
616 ih->ih_pri = pri;
618 ih->ih_flags = IH_EXCLUSIVE;
620 ih->ih_flags |= IH_MPSAFE;
622 ih->ih_flags |= IH_ENTROPY;
624 ih->ih_flags |= IH_NET;
632 free(ih, M_ITHREAD);
656 if (temp_ih->ih_pri > ih->ih_pri)
659 CK_SLIST_INSERT_PREVPTR(prevptr, temp_ih, ih, ih_next);
663 CTR3(KTR_INTR, "%s: added %s to %s", __func__, ih->ih_name,
668 *cookiep = ih;
680 struct intr_handler *ih;
686 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
687 if (ih == cookie)
690 if (ih == NULL) {
695 ih = cookie;
704 start = strchr(ih->ih_name, ':');
706 start = strchr(ih->ih_name, 0);
713 space = sizeof(ih->ih_name) - (start - ih->ih_name) - 1;
734 struct intr_handler *ih;
737 ih = (struct intr_handler *)cookie;
738 if (ih == NULL)
740 ie = ih->ih_event;
743 ih->ih_name));
852 struct intr_handler *ih;
868 CK_SLIST_FOREACH_PREVPTR(ih, prevptr, &ie->ie_handlers, ih_next) {
869 if (ih == handler)
872 if (ih == NULL) {
884 CK_SLIST_REMOVE_PREVPTR(prevptr, ih, ih_next);
913 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
914 if (ih->ih_handler != NULL) {
1091 struct intr_handler *ih = (struct intr_handler *)cookie;
1092 struct intr_event *ie = ih->ih_event;
1096 CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name,
1097 ih->ih_need);
1100 entropy.event = (uintptr_t)ih;
1110 ih->ih_need = 1;
1144 struct intr_handler *ih, *ihn, *ihp;
1147 CK_SLIST_FOREACH_SAFE(ih, &ie->ie_handlers, ih_next, ihn) {
1152 if (ih->ih_flags & IH_DEAD) {
1158 ih->ih_flags &= ~IH_DEAD;
1159 wakeup(ih);
1168 ihp = ih;
1170 if ((ih->ih_flags & IH_CHANGED) != 0) {
1172 ih->ih_flags &= ~IH_CHANGED;
1173 wakeup(ih);
1178 if (ih->ih_handler == NULL)
1182 if ((ih->ih_flags & IH_SUSP) != 0)
1195 atomic_cmpset_int(&ih->ih_need, 1, 0) == 0)
1200 __func__, p->p_pid, (void *)ih->ih_handler,
1201 ih->ih_argument, ih->ih_name, ih->ih_flags);
1203 if (!(ih->ih_flags & IH_MPSAFE))
1205 ih->ih_handler(ih->ih_argument);
1206 if (!(ih->ih_flags & IH_MPSAFE))
1361 struct intr_handler *ih;
1398 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
1399 if ((ih->ih_flags & IH_SUSP) != 0)
1401 if ((ie->ie_flags & IE_SOFT) != 0 && ih->ih_need == 0)
1403 if (ih->ih_filter == NULL) {
1408 ih->ih_filter, ih->ih_argument, ih->ih_name);
1409 ret = ih->ih_filter(ih->ih_argument);
1417 ih->ih_name));
1481 db_dump_intrhand(struct intr_handler *ih)
1485 db_printf("\t%-10s ", ih->ih_name);
1486 switch (ih->ih_pri) {
1494 if (ih->ih_pri >= PI_SOFT)
1497 db_printf("%4u", ih->ih_pri);
1501 if (ih->ih_filter != NULL) {
1503 db_printsym((uintptr_t)ih->ih_filter, DB_STGY_PROC);
1505 if (ih->ih_handler != NULL) {
1506 if (ih->ih_filter != NULL)
1509 db_printsym((uintptr_t)ih->ih_handler, DB_STGY_PROC);
1511 db_printf("(%p)", ih->ih_argument);
1512 if (ih->ih_need ||
1513 (ih->ih_flags & (IH_EXCLUSIVE | IH_ENTROPY | IH_DEAD |
1517 if (ih->ih_flags & IH_EXCLUSIVE) {
1523 if (ih->ih_flags & IH_ENTROPY) {
1529 if (ih->ih_flags & IH_DEAD) {
1535 if (ih->ih_flags & IH_MPSAFE) {
1541 if (ih->ih_need) {
1557 struct intr_handler *ih;
1591 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next)
1592 db_dump_intrhand(ih);