Lines Matching defs:idp

2043 cyclic_juggle_one_to(cyc_id_t *idp, cyc_cpu_t *dest)
2045 cyc_cpu_t *src = idp->cyi_cpu;
2046 cyc_index_t ndx = idp->cyi_ndx;
2054 ASSERT(src != NULL && idp->cyi_omni_list == NULL);
2056 CYC_PTRACE("juggle-one-to", idp, dest);
2075 CYC_PTRACE("remove-expand", idp, dest);
2085 rw_enter(&idp->cyi_lock, RW_WRITER);
2112 CYC_PTRACE("remove-retry", idp, src);
2121 rw_exit(&idp->cyi_lock);
2123 rw_enter(&idp->cyi_lock, RW_WRITER);
2131 idp->cyi_ndx = cyclic_add_here(dest, &hdlr, &when, flags);
2132 idp->cyi_cpu = dest;
2139 rw_exit(&idp->cyi_lock);
2143 cyclic_juggle_one(cyc_id_t *idp)
2145 cyc_index_t ndx = idp->cyi_ndx;
2146 cyc_cpu_t *cpu = idp->cyi_cpu, *dest;
2151 CYC_PTRACE("juggle-one", idp, cpu);
2161 CYC_PTRACE("juggle-fail", idp, cpu)
2165 cyclic_juggle_one_to(idp, dest);
2173 cyc_id_t *idp = (cyc_id_t *)id;
2174 cyc_cpu_t *cpu = idp->cyi_cpu;
2176 cyclic_t *cyclic = &cpu->cyp_cyclics[idp->cyi_ndx];
2193 int res = cyclic_juggle_one(idp);
2195 ASSERT((res && idp->cyi_cpu != cpu) ||
2203 cyc_id_t *idp = (cyc_id_t *)id;
2204 cyc_cpu_t *dest = d->cpu_cyclic, *cpu = idp->cyi_cpu;
2206 cyclic_t *cyclic = &cpu->cyp_cyclics[idp->cyi_ndx];
2222 cyclic_juggle_one_to(idp, dest);
2223 cyclic = &dest->cyp_cyclics[idp->cyi_ndx];
2232 cyc_id_t *idp = (cyc_id_t *)id;
2233 cyc_cpu_t *cpu = idp->cyi_cpu;
2235 cyclic_t *cyc = &cpu->cyp_cyclics[idp->cyi_ndx];
2237 CYC_PTRACE("unbind-part", idp, c->cpu_part);
2250 int res = cyclic_juggle_one(idp);
2252 ASSERT(res && idp->cyi_cpu != cpu);
2259 cyc_id_t *idp = (cyc_id_t *)id;
2260 cyc_cpu_t *cpu = idp->cyi_cpu, *dest;
2262 cyclic_t *cyc = &cpu->cyp_cyclics[idp->cyi_ndx];
2264 CYC_PTRACE("bind-part", idp, part);
2275 cyclic_juggle_one_to(idp, dest);
2276 cyc = &dest->cyp_cyclics[idp->cyi_ndx];
2484 cyclic_omni_start(cyc_id_t *idp, cyc_cpu_t *cpu)
2486 cyc_omni_handler_t *omni = &idp->cyi_omni_hdlr;
2491 CYC_PTRACE("omni-start", cpu, idp);
2494 ASSERT(idp->cyi_cpu == NULL);
2512 ocpu->cyo_next = idp->cyi_omni_list;
2513 idp->cyi_omni_list = ocpu;
2517 cyclic_omni_stop(cyc_id_t *idp, cyc_cpu_t *cpu)
2519 cyc_omni_handler_t *omni = &idp->cyi_omni_hdlr;
2520 cyc_omni_cpu_t *ocpu = idp->cyi_omni_list, *prev = NULL;
2524 CYC_PTRACE("omni-stop", cpu, idp);
2527 ASSERT(idp->cyi_cpu == NULL);
2535 rw_enter(&idp->cyi_lock, RW_WRITER);
2550 idp->cyi_omni_list = ocpu->cyo_next;
2584 CYC_PTRACE("remove-omni-retry", idp, ocpu->cyo_cpu);
2590 rw_exit(&idp->cyi_lock);
2592 rw_enter(&idp->cyi_lock, RW_WRITER);
2599 rw_exit(&idp->cyi_lock);
2614 cyc_id_t *idp;
2618 idp = kmem_cache_alloc(cyclic_id_cache, KM_SLEEP);
2627 idp->cyi_cpu = NULL;
2628 idp->cyi_ndx = 0;
2629 rw_init(&idp->cyi_lock, NULL, RW_DEFAULT, NULL);
2631 idp->cyi_next = cyclic_id_head;
2632 idp->cyi_prev = NULL;
2633 idp->cyi_omni_list = NULL;
2637 cyclic_id_head->cyi_prev = idp;
2640 cyclic_id_head = idp;
2642 return (idp);
2736 cyc_id_t *idp = cyclic_new_id();
2741 idp->cyi_cpu = cyclic_pick_cpu(NULL, NULL, NULL, 0);
2742 idp->cyi_ndx = cyclic_add_here(idp->cyi_cpu, hdlr, when, 0);
2744 return ((uintptr_t)idp);
2832 cyc_id_t *idp = cyclic_new_id();
2839 idp->cyi_omni_hdlr = *omni;
2851 cyclic_omni_start(idp, cpu);
2858 ASSERT(idp->cyi_omni_list != NULL);
2859 ASSERT(idp->cyi_cpu == NULL);
2861 return ((uintptr_t)idp);
2897 cyc_id_t *idp = (cyc_id_t *)id;
2898 cyc_id_t *prev = idp->cyi_prev, *next = idp->cyi_next;
2899 cyc_cpu_t *cpu = idp->cyi_cpu;
2901 CYC_PTRACE("remove", idp, idp->cyi_cpu);
2905 (void) cyclic_remove_here(cpu, idp->cyi_ndx, NULL, CY_WAIT);
2907 ASSERT(idp->cyi_omni_list != NULL);
2908 while (idp->cyi_omni_list != NULL)
2909 cyclic_omni_stop(idp, idp->cyi_omni_list->cyo_cpu);
2913 ASSERT(cyclic_id_head != idp);
2916 ASSERT(cyclic_id_head == idp);
2923 kmem_cache_free(cyclic_id_cache, idp);
2998 cyc_id_t *idp = (cyc_id_t *)id;
2999 cyc_cpu_t *cpu = idp->cyi_cpu;
3008 ASSERT(idp->cyi_omni_list != NULL);
3013 flags = cpu->cyp_cyclics[idp->cyi_ndx].cy_flags;
3023 cpu = idp->cyi_cpu;
3034 cpu = idp->cyi_cpu;
3036 flags = cpu->cyp_cyclics[idp->cyi_ndx].cy_flags;
3050 cyc_id_t *idp = (cyc_id_t *)id;
3057 CYC_PTRACE("reprog", idp, idp->cyi_cpu);
3064 rw_enter(&idp->cyi_lock, RW_READER);
3066 if (idp->cyi_cpu == NULL) {
3074 ocpu = idp->cyi_omni_list;
3087 rw_exit(&idp->cyi_lock);
3095 cpu = idp->cyi_cpu;
3096 ndx = idp->cyi_ndx;
3107 rw_exit(&idp->cyi_lock);
3206 cyc_id_t *idp;
3216 for (idp = cyclic_id_head; idp != NULL; idp = idp->cyi_next) {
3217 if (idp->cyi_cpu != cpu)
3220 if (cyclic_juggle_one(idp) == 0) {
3225 ASSERT(idp->cyi_cpu != cpu);
3267 cyc_id_t *idp;
3279 for (idp = cyclic_id_head; idp != NULL; idp = idp->cyi_next) {
3280 if (idp->cyi_cpu != NULL)
3287 ASSERT(idp->cyi_omni_list != NULL);
3288 cyclic_omni_stop(idp, cpu);
3324 cyc_id_t *idp;
3337 for (idp = cyclic_id_head; idp != NULL; idp = idp->cyi_next) {
3338 if (idp->cyi_cpu != NULL)
3341 cyclic_omni_start(idp, cpu);
3375 cyc_id_t *idp;
3394 for (idp = cyclic_id_head; idp != NULL; idp = idp->cyi_next) {
3395 cyc_cpu_t *cpu = idp->cyi_cpu;
3409 cyclic = &cpu->cyp_cyclics[idp->cyi_ndx];
3420 cyclic_juggle_one_to(idp, dest);
3469 cyc_id_t *idp;
3481 for (idp = cyclic_id_head; idp != NULL; idp = idp->cyi_next) {
3483 if (idp->cyi_cpu != cpu)
3486 cyclic = &cyclics[idp->cyi_ndx];
3499 CYC_PTRACE("move-out-fail", cpu, idp);
3502 cyclic_juggle_one_to(idp, dest);