Lines Matching refs:sh

301 	softhand_t *sh, *shmax;  in softint_init()  local
334 sh = sc->sc_hand; in softint_init()
335 memcpy(sh, scfirst->sc_hand, sizeof(*sh) * softint_max); in softint_init()
337 for (shmax = sh + softint_max; sh < shmax; sh++) { in softint_init()
338 if (sh->sh_func == NULL) in softint_init()
340 sh->sh_isr = in softint_init()
341 &sc->sc_int[sh->sh_flags & SOFTINT_LVLMASK]; in softint_init()
358 softhand_t *sh; in softint_establish() local
394 sh = &sc->sc_hand[index]; in softint_establish()
395 sh->sh_isr = &sc->sc_int[level]; in softint_establish()
396 sh->sh_func = func; in softint_establish()
397 sh->sh_arg = arg; in softint_establish()
398 sh->sh_flags = flags; in softint_establish()
399 sh->sh_ipi_id = ipi_id; in softint_establish()
402 sh = &sc->sc_hand[index]; in softint_establish()
403 sh->sh_isr = &sc->sc_int[level]; in softint_establish()
404 sh->sh_func = func; in softint_establish()
405 sh->sh_arg = arg; in softint_establish()
406 sh->sh_flags = flags; in softint_establish()
407 sh->sh_ipi_id = ipi_id; in softint_establish()
432 softhand_t *sh; in softint_disestablish() local
445 sh = (softhand_t *)((uint8_t *)sc + offset); in softint_disestablish()
446 if (sh->sh_ipi_id) { in softint_disestablish()
447 ipi_unregister(sh->sh_ipi_id); in softint_disestablish()
455 xc_barrier(XC_HIGHPRI_IPL(sh->sh_isr->si_ipl)); in softint_disestablish()
467 sh = (softhand_t *)((uint8_t *)sc + offset); in softint_disestablish()
468 KASSERT(sh->sh_func != NULL); in softint_disestablish()
469 sh->sh_func = NULL; in softint_disestablish()
484 softhand_t *sh; in softint_schedule() local
503 sh = (softhand_t *)((uint8_t *)curcpu()->ci_data.cpu_softcpu + offset); in softint_schedule()
506 if ((sh->sh_flags & SOFTINT_PENDING) != 0) { in softint_schedule()
515 if ((sh->sh_flags & SOFTINT_PENDING) == 0) { in softint_schedule()
516 si = sh->sh_isr; in softint_schedule()
517 sh->sh_flags |= SOFTINT_PENDING; in softint_schedule()
518 SIMPLEQ_INSERT_TAIL(&si->si_q, sh, sh_q); in softint_schedule()
542 const softhand_t *sh; in softint_schedule_cpu() local
545 sh = (const softhand_t *)((const uint8_t *)sc + offset); in softint_schedule_cpu()
546 KASSERT((sh->sh_flags & SOFTINT_RCPU) != 0); in softint_schedule_cpu()
547 ipi_trigger(sh->sh_ipi_id, ci); in softint_schedule_cpu()
566 softhand_t *sh; in softint_execute() local
587 sh = SIMPLEQ_FIRST(&si->si_q); in softint_execute()
589 KASSERT((sh->sh_flags & SOFTINT_PENDING) != 0); in softint_execute()
590 sh->sh_flags ^= SOFTINT_PENDING; in softint_execute()
595 ((const char *)sh - in softint_execute()
597 sh->sh_func, sh->sh_arg, sh->sh_flags); in softint_execute()
598 if (__predict_true((sh->sh_flags & SOFTINT_MPSAFE) != 0)) { in softint_execute()
599 (*sh->sh_func)(sh->sh_arg); in softint_execute()
602 (*sh->sh_func)(sh->sh_arg); in softint_execute()
606 ((const char *)sh - in softint_execute()
608 sh->sh_func, sh->sh_arg, sh->sh_flags); in softint_execute()
613 __func__, curcpu()->ci_mtx_count, sh->sh_func); in softint_execute()
616 __func__, l->l_psrefs, sh->sh_func); in softint_execute()
620 __func__, sh->sh_func, curlwp->l_blcnt); in softint_execute()
624 __func__, l, l->l_nopreempt, sh->sh_func); in softint_execute()