Lines Matching refs:ih

188 	struct intr_handler *ih;
200 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
201 if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 1 <
204 strcat(ie->ie_fullname, ih->ih_name);
208 if (ih->ih_flags & IH_ENTROPY)
220 ih = CK_SLIST_FIRST(&ie->ie_handlers);
221 missed = strlen(ie->ie_fullname) + strlen(ih->ih_name) + 2 -
224 strcat(ie->ie_fullname, &ih->ih_name[missed]);
553 struct intr_handler *ih, *temp_ih;
561 ih = malloc(sizeof(struct intr_handler), M_ITHREAD, M_WAITOK | M_ZERO);
562 ih->ih_filter = filter;
563 ih->ih_handler = handler;
564 ih->ih_argument = arg;
565 strlcpy(ih->ih_name, name, sizeof(ih->ih_name));
566 ih->ih_event = ie;
567 ih->ih_pri = pri;
569 ih->ih_flags = IH_EXCLUSIVE;
571 ih->ih_flags |= IH_MPSAFE;
573 ih->ih_flags |= IH_ENTROPY;
581 free(ih, M_ITHREAD);
605 if (temp_ih->ih_pri > ih->ih_pri)
608 CK_SLIST_INSERT_PREVPTR(prevptr, temp_ih, ih, ih_next);
612 CTR3(KTR_INTR, "%s: added %s to %s", __func__, ih->ih_name,
617 *cookiep = ih;
629 struct intr_handler *ih;
635 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
636 if (ih == cookie)
639 if (ih == NULL) {
644 ih = cookie;
653 start = strchr(ih->ih_name, ':');
655 start = strchr(ih->ih_name, 0);
662 space = sizeof(ih->ih_name) - (start - ih->ih_name) - 1;
683 struct intr_handler *ih;
686 ih = (struct intr_handler *)cookie;
687 if (ih == NULL)
689 ie = ih->ih_event;
692 ih->ih_name));
801 struct intr_handler *ih;
817 CK_SLIST_FOREACH_PREVPTR(ih, prevptr, &ie->ie_handlers, ih_next) {
818 if (ih == handler)
821 if (ih == NULL) {
833 CK_SLIST_REMOVE_PREVPTR(prevptr, ih, ih_next);
862 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
863 if (ih->ih_handler != NULL) {
1029 struct intr_handler *ih = (struct intr_handler *)cookie;
1030 struct intr_event *ie = ih->ih_event;
1034 CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name,
1035 ih->ih_need);
1038 entropy.event = (uintptr_t)ih;
1048 ih->ih_need = 1;
1082 struct intr_handler *ih, *ihn, *ihp;
1085 CK_SLIST_FOREACH_SAFE(ih, &ie->ie_handlers, ih_next, ihn) {
1090 if (ih->ih_flags & IH_DEAD) {
1096 ih->ih_flags &= ~IH_DEAD;
1097 wakeup(ih);
1106 ihp = ih;
1108 if ((ih->ih_flags & IH_CHANGED) != 0) {
1110 ih->ih_flags &= ~IH_CHANGED;
1111 wakeup(ih);
1116 if (ih->ih_handler == NULL)
1120 if ((ih->ih_flags & IH_SUSP) != 0)
1133 atomic_cmpset_int(&ih->ih_need, 1, 0) == 0)
1138 __func__, p->p_pid, (void *)ih->ih_handler,
1139 ih->ih_argument, ih->ih_name, ih->ih_flags);
1141 if (!(ih->ih_flags & IH_MPSAFE))
1143 ih->ih_handler(ih->ih_argument);
1144 if (!(ih->ih_flags & IH_MPSAFE))
1278 struct intr_handler *ih;
1318 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) {
1319 if ((ih->ih_flags & IH_SUSP) != 0)
1321 if ((ie->ie_flags & IE_SOFT) != 0 && ih->ih_need == 0)
1323 if (ih->ih_filter == NULL) {
1328 ih->ih_filter, ih->ih_argument == NULL ? frame :
1329 ih->ih_argument, ih->ih_name);
1330 if (ih->ih_argument == NULL)
1331 ret = ih->ih_filter(frame);
1333 ret = ih->ih_filter(ih->ih_argument);
1338 ih->ih_name));
1394 db_dump_intrhand(struct intr_handler *ih)
1398 db_printf("\t%-10s ", ih->ih_name);
1399 switch (ih->ih_pri) {
1419 if (ih->ih_pri >= PI_SOFT)
1422 db_printf("%4u", ih->ih_pri);
1426 if (ih->ih_filter != NULL) {
1428 db_printsym((uintptr_t)ih->ih_filter, DB_STGY_PROC);
1430 if (ih->ih_handler != NULL) {
1431 if (ih->ih_filter != NULL)
1434 db_printsym((uintptr_t)ih->ih_handler, DB_STGY_PROC);
1436 db_printf("(%p)", ih->ih_argument);
1437 if (ih->ih_need ||
1438 (ih->ih_flags & (IH_EXCLUSIVE | IH_ENTROPY | IH_DEAD |
1442 if (ih->ih_flags & IH_EXCLUSIVE) {
1448 if (ih->ih_flags & IH_ENTROPY) {
1454 if (ih->ih_flags & IH_DEAD) {
1460 if (ih->ih_flags & IH_MPSAFE) {
1466 if (ih->ih_need) {
1482 struct intr_handler *ih;
1522 CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next)
1523 db_dump_intrhand(ih);