Lines Matching refs:pctx

45 	struct pctxop *pctx;  in installpctx()  local
47 pctx = kmem_alloc(sizeof (struct pctxop), KM_SLEEP); in installpctx()
48 pctx->save_op = save; in installpctx()
49 pctx->restore_op = restore; in installpctx()
50 pctx->fork_op = fork; in installpctx()
51 pctx->exit_op = exit; in installpctx()
52 pctx->free_op = free; in installpctx()
53 pctx->arg = arg; in installpctx()
54 pctx->next = p->p_pctx; in installpctx()
55 p->p_pctx = pctx; in installpctx()
71 struct pctxop *pctx, *prev_pctx; in removepctx() local
75 for (pctx = p->p_pctx; pctx != NULL; pctx = pctx->next) { in removepctx()
76 if (pctx->save_op == save && pctx->restore_op == restore && in removepctx()
77 pctx->fork_op == fork && in removepctx()
78 pctx->exit_op == exit && pctx->free_op == free && in removepctx()
79 pctx->arg == arg) { in removepctx()
81 prev_pctx->next = pctx->next; in removepctx()
83 p->p_pctx = pctx->next; in removepctx()
84 if (pctx->free_op != NULL) in removepctx()
85 (pctx->free_op)(pctx->arg, 0); in removepctx()
86 kmem_free(pctx, sizeof (struct pctxop)); in removepctx()
90 prev_pctx = pctx; in removepctx()
99 struct pctxop *pctx; in savepctx() local
102 for (pctx = p->p_pctx; pctx != 0; pctx = pctx->next) in savepctx()
103 if (pctx->save_op != NULL) in savepctx()
104 (pctx->save_op)(pctx->arg); in savepctx()
110 struct pctxop *pctx; in restorepctx() local
113 for (pctx = p->p_pctx; pctx != 0; pctx = pctx->next) in restorepctx()
114 if (pctx->restore_op != NULL) in restorepctx()
115 (pctx->restore_op)(pctx->arg); in restorepctx()
121 struct pctxop *pctx; in forkpctx() local
123 for (pctx = p->p_pctx; pctx != NULL; pctx = pctx->next) in forkpctx()
124 if (pctx->fork_op != NULL) in forkpctx()
125 (pctx->fork_op)(p, cp); in forkpctx()
138 struct pctxop *pctx; in exitpctx() local
140 for (pctx = p->p_pctx; pctx != NULL; pctx = pctx->next) in exitpctx()
141 if (pctx->exit_op != NULL) in exitpctx()
142 (pctx->exit_op)(p); in exitpctx()
151 struct pctxop *pctx; in freepctx() local
154 while ((pctx = p->p_pctx) != NULL) { in freepctx()
155 p->p_pctx = pctx->next; in freepctx()
156 if (pctx->free_op != NULL) in freepctx()
157 (pctx->free_op)(pctx->arg, isexec); in freepctx()
158 kmem_free(pctx, sizeof (struct pctxop)); in freepctx()