| 920 | } |
| 921 | |
| 922 | int |
| 923 | intr_event_resume_handler(void *cookie) |
| 924 | { |
| 925 | struct intr_handler *handler = (struct intr_handler *)cookie; |
| 926 | struct intr_event *ie; |
| 927 | |
| 928 | if (handler == NULL) |
| 929 | return (EINVAL); |
| 930 | ie = handler->ih_event; |
| 931 | KASSERT(ie != NULL, |
| 932 | ("interrupt handler \"%s\" has a NULL interrupt event", |
| 933 | handler->ih_name)); |
| 934 | |
| 935 | /* |
| 936 | * intr_handler_barrier() acts not only as a barrier, |
| 937 | * it also allows to check for any pending interrupts. |
| 938 | */ |
| 939 | mtx_lock(&ie->ie_lock); |
| 940 | handler->ih_flags &= ~IH_SUSP; |
| 941 | intr_handler_barrier(handler); |
| 942 | mtx_unlock(&ie->ie_lock); |
| 943 | return (0); |
| 944 | } |
| 945 | |
| 946 | static int |
| 947 | intr_event_schedule_thread(struct intr_event *ie) |
no test coverage detected