Lines Matching refs:ctx

1042 	struct ctxop *ctx;
1044 ctx = kmem_alloc(sizeof (struct ctxop), KM_SLEEP);
1045 ctx->save_op = save;
1046 ctx->restore_op = restore;
1047 ctx->fork_op = fork;
1048 ctx->lwp_create_op = lwp_create;
1049 ctx->exit_op = exit;
1050 ctx->free_op = free;
1051 ctx->arg = arg;
1052 ctx->next = t->t_ctx;
1053 t->t_ctx = ctx;
1070 struct ctxop *ctx, *prev_ctx;
1097 for (ctx = t->t_ctx; ctx != NULL; ctx = ctx->next) {
1098 if (ctx->save_op == save && ctx->restore_op == restore &&
1099 ctx->fork_op == fork && ctx->lwp_create_op == lwp_create &&
1100 ctx->exit_op == exit && ctx->free_op == free &&
1101 ctx->arg == arg) {
1103 prev_ctx->next = ctx->next;
1105 t->t_ctx = ctx->next;
1107 if (ctx->free_op != NULL)
1108 (ctx->free_op)(ctx->arg, 0);
1109 kmem_free(ctx, sizeof (struct ctxop));
1113 prev_ctx = ctx;
1124 struct ctxop *ctx;
1127 for (ctx = t->t_ctx; ctx != 0; ctx = ctx->next)
1128 if (ctx->save_op != NULL)
1129 (ctx->save_op)(ctx->arg);
1135 struct ctxop *ctx;
1138 for (ctx = t->t_ctx; ctx != 0; ctx = ctx->next)
1139 if (ctx->restore_op != NULL)
1140 (ctx->restore_op)(ctx->arg);
1146 struct ctxop *ctx;
1148 for (ctx = t->t_ctx; ctx != NULL; ctx = ctx->next)
1149 if (ctx->fork_op != NULL)
1150 (ctx->fork_op)(t, ct);
1161 struct ctxop *ctx;
1163 for (ctx = t->t_ctx; ctx != NULL; ctx = ctx->next)
1164 if (ctx->lwp_create_op != NULL)
1165 (ctx->lwp_create_op)(t, ct);
1178 struct ctxop *ctx;
1180 for (ctx = t->t_ctx; ctx != NULL; ctx = ctx->next)
1181 if (ctx->exit_op != NULL)
1182 (ctx->exit_op)(t);
1192 struct ctxop *ctx;
1195 while ((ctx = t->t_ctx) != NULL) {
1196 t->t_ctx = ctx->next;
1197 if (ctx->free_op != NULL)
1198 (ctx->free_op)(ctx->arg, isexec);
1199 kmem_free(ctx, sizeof (struct ctxop));
1207 * The thread structure to which this ctx was attached may be already
1209 * on thread structure to which this ctx was attached still being around.
1212 freectx_ctx(struct ctxop *ctx)
1216 ASSERT(ctx != NULL);
1220 nctx = ctx->next;
1221 if (ctx->free_op != NULL)
1222 (ctx->free_op)(ctx->arg, 0);
1223 kmem_free(ctx, sizeof (struct ctxop));
1224 } while ((ctx = nctx) != NULL);