Lines Matching defs:cpu_ctx
608 cu_cpc_ctx_t *cpu_ctx;
664 cpu_ctx = &cu_cpu_info->cu_cpc_ctx;
665 ASSERT(cpu_ctx != NULL);
666 ASSERT(cpu_ctx->nctx >= 0);
668 ASSERT(cpu_ctx->ctx_ptr_array == NULL || cpu_ctx->ctx_ptr_array_sz > 0);
669 ASSERT(cpu_ctx->nctx <= cpu_ctx->ctx_ptr_array_sz);
670 if (cpu_ctx->nctx <= 0 || cpu_ctx->ctx_ptr_array == NULL ||
671 cpu_ctx->ctx_ptr_array_sz <= 0) {
685 cpu_ctx->cur_index = (cpu_ctx->cur_index + 1) % cpu_ctx->nctx;
687 ctx = cpu_ctx->ctx_ptr_array[cpu_ctx->cur_index];
780 cu_cpc_ctx_t *cpu_ctx;
826 cpu_ctx = &cu_cpu_info->cu_cpc_ctx;
827 if (cpu_ctx->nctx <= 0 || cpu_ctx->ctx_ptr_array == NULL ||
828 cpu_ctx->ctx_ptr_array_sz <= 0) {
833 ctx = cpu_ctx->ctx_ptr_array[cpu_ctx->cur_index];
1080 cu_cpc_ctx_t *cpu_ctx;
1111 cpu_ctx = &cu_cpu_info->cu_cpc_ctx;
1112 if (cpu_ctx->nctx > 0 && cpu_ctx->ctx_ptr_array != NULL &&
1113 cpu_ctx->ctx_ptr_array_sz > 0) {
1120 ASSERT(cpu_ctx->nctx == 0 && cpu_ctx->ctx_ptr_array == NULL &&
1121 cpu_ctx->ctx_ptr_array_sz == 0);
1175 cpu_ctx->cur_index = 0;
1176 cpu_ctx->nctx = n;
1177 cpu_ctx->ctx_ptr_array = ctx_ptr_array;
1178 cpu_ctx->ctx_ptr_array_sz = ctx_ptr_array_sz;
1189 cu_cpc_ctx_t *cpu_ctx;
1250 cpu_ctx = &cu_cpu_info->cu_cpc_ctx;
1251 if (cpu_ctx != NULL && cpu_ctx->ctx_ptr_array != NULL &&
1252 cpu_ctx->ctx_ptr_array_sz > 0) {
1256 for (i = 0; i < cpu_ctx->nctx; i++) {
1257 ctx = cpu_ctx->ctx_ptr_array[i];
1266 kmem_free(cpu_ctx->ctx_ptr_array, cpu_ctx->ctx_ptr_array_sz);
1271 bzero(cpu_ctx, sizeof (cu_cpc_ctx_t));