64 int (*cl_parmsout)(void *, pc_vaparms_t *);
65 int (*cl_vaparmsin)(void *, pc_vaparms_t *);
66 int (*cl_vaparmsout)(void *, pc_vaparms_t *);
67 int (*cl_getclpri)(pcpri_t *);
68 int (*cl_alloc)(void **, int);
69 void (*cl_free)(void *);
70 } class_ops_t;
71
72 typedef struct thread_ops {
73 int (*cl_enterclass)(kthread_t *, id_t, void *, cred_t *, void *);
74 void (*cl_exitclass)(void *);
75 int (*cl_canexit)(kthread_t *, cred_t *);
76 int (*cl_fork)(kthread_t *, kthread_t *, void *);
77 void (*cl_forkret)(kthread_t *, kthread_t *);
78 void (*cl_parmsget)(kthread_t *, void *);
79 int (*cl_parmsset)(kthread_t *, void *, id_t, cred_t *);
80 void (*cl_stop)(kthread_t *, int, int);
81 void (*cl_exit)(kthread_t *);
82 void (*cl_active)(kthread_t *);
83 void (*cl_inactive)(kthread_t *);
84 pri_t (*cl_swapin)(kthread_t *, int);
85 pri_t (*cl_swapout)(kthread_t *, int);
86 void (*cl_trapret)(kthread_t *);
87 void (*cl_preempt)(kthread_t *);
88 void (*cl_setrun)(kthread_t *);
89 void (*cl_sleep)(kthread_t *);
90 void (*cl_tick)(kthread_t *);
91 void (*cl_wakeup)(kthread_t *);
92 int (*cl_donice)(kthread_t *, cred_t *, int, int *);
93 pri_t (*cl_globpri)(kthread_t *);
94 void (*cl_set_process_group)(pid_t, pid_t, pid_t);
95 void (*cl_yield)(kthread_t *);
96 int (*cl_doprio)(kthread_t *, cred_t *, int, int *);
97 } thread_ops_t;
98
99 typedef struct classfuncs {
100 class_ops_t sclass;
101 thread_ops_t thread;
102 } classfuncs_t;
103
104 typedef struct sclass {
105 char *cl_name; /* class name */
178
179 #define CL_VAPARMSOUT(clp, clparmsp, vaparmsp) \
180 (clp)->cl_funcs->sclass.cl_vaparmsout((void *)clparmsp, vaparmsp)
181
182 #define CL_PARMSSET(t, clparmsp, cid, curpcredp) \
183 (*(t)->t_clfuncs->cl_parmsset)(t, (void *)clparmsp, cid, curpcredp)
184
185 #define CL_PREEMPT(tp) (*(tp)->t_clfuncs->cl_preempt)(tp)
186
187 #define CL_SETRUN(tp) (*(tp)->t_clfuncs->cl_setrun)(tp)
188
189 #define CL_SLEEP(tp) (*(tp)->t_clfuncs->cl_sleep)(tp)
190
191 #define CL_STOP(t, why, what) (*(t)->t_clfuncs->cl_stop)(t, why, what)
192
193 #define CL_EXIT(t) (*(t)->t_clfuncs->cl_exit)(t)
194
195 #define CL_ACTIVE(t) (*(t)->t_clfuncs->cl_active)(t)
196
197 #define CL_INACTIVE(t) (*(t)->t_clfuncs->cl_inactive)(t)
198
199 #define CL_SWAPIN(t, flags) (*(t)->t_clfuncs->cl_swapin)(t, flags)
200
201 #define CL_SWAPOUT(t, flags) (*(t)->t_clfuncs->cl_swapout)(t, flags)
202
203 #define CL_TICK(t) (*(t)->t_clfuncs->cl_tick)(t)
204
205 #define CL_TRAPRET(t) (*(t)->t_clfuncs->cl_trapret)(t)
206
207 #define CL_WAKEUP(t) (*(t)->t_clfuncs->cl_wakeup)(t)
208
209 #define CL_DONICE(t, cr, inc, ret) \
210 (*(t)->t_clfuncs->cl_donice)(t, cr, inc, ret)
211
212 #define CL_DOPRIO(t, cr, inc, ret) \
213 (*(t)->t_clfuncs->cl_doprio)(t, cr, inc, ret)
214
215 #define CL_GLOBPRI(t) (*(t)->t_clfuncs->cl_globpri)(t)
216
217 #define CL_SET_PROCESS_GROUP(t, s, b, f) \
218 (*(t)->t_clfuncs->cl_set_process_group)(s, b, f)
219
220 #define CL_YIELD(tp) (*(tp)->t_clfuncs->cl_yield)(tp)
221
|
64 int (*cl_parmsout)(void *, pc_vaparms_t *);
65 int (*cl_vaparmsin)(void *, pc_vaparms_t *);
66 int (*cl_vaparmsout)(void *, pc_vaparms_t *);
67 int (*cl_getclpri)(pcpri_t *);
68 int (*cl_alloc)(void **, int);
69 void (*cl_free)(void *);
70 } class_ops_t;
71
72 typedef struct thread_ops {
73 int (*cl_enterclass)(kthread_t *, id_t, void *, cred_t *, void *);
74 void (*cl_exitclass)(void *);
75 int (*cl_canexit)(kthread_t *, cred_t *);
76 int (*cl_fork)(kthread_t *, kthread_t *, void *);
77 void (*cl_forkret)(kthread_t *, kthread_t *);
78 void (*cl_parmsget)(kthread_t *, void *);
79 int (*cl_parmsset)(kthread_t *, void *, id_t, cred_t *);
80 void (*cl_stop)(kthread_t *, int, int);
81 void (*cl_exit)(kthread_t *);
82 void (*cl_active)(kthread_t *);
83 void (*cl_inactive)(kthread_t *);
84 void (*cl_trapret)(kthread_t *);
85 void (*cl_preempt)(kthread_t *);
86 void (*cl_setrun)(kthread_t *);
87 void (*cl_sleep)(kthread_t *);
88 void (*cl_tick)(kthread_t *);
89 void (*cl_wakeup)(kthread_t *);
90 int (*cl_donice)(kthread_t *, cred_t *, int, int *);
91 pri_t (*cl_globpri)(kthread_t *);
92 void (*cl_set_process_group)(pid_t, pid_t, pid_t);
93 void (*cl_yield)(kthread_t *);
94 int (*cl_doprio)(kthread_t *, cred_t *, int, int *);
95 } thread_ops_t;
96
97 typedef struct classfuncs {
98 class_ops_t sclass;
99 thread_ops_t thread;
100 } classfuncs_t;
101
102 typedef struct sclass {
103 char *cl_name; /* class name */
176
177 #define CL_VAPARMSOUT(clp, clparmsp, vaparmsp) \
178 (clp)->cl_funcs->sclass.cl_vaparmsout((void *)clparmsp, vaparmsp)
179
180 #define CL_PARMSSET(t, clparmsp, cid, curpcredp) \
181 (*(t)->t_clfuncs->cl_parmsset)(t, (void *)clparmsp, cid, curpcredp)
182
183 #define CL_PREEMPT(tp) (*(tp)->t_clfuncs->cl_preempt)(tp)
184
185 #define CL_SETRUN(tp) (*(tp)->t_clfuncs->cl_setrun)(tp)
186
187 #define CL_SLEEP(tp) (*(tp)->t_clfuncs->cl_sleep)(tp)
188
189 #define CL_STOP(t, why, what) (*(t)->t_clfuncs->cl_stop)(t, why, what)
190
191 #define CL_EXIT(t) (*(t)->t_clfuncs->cl_exit)(t)
192
193 #define CL_ACTIVE(t) (*(t)->t_clfuncs->cl_active)(t)
194
195 #define CL_INACTIVE(t) (*(t)->t_clfuncs->cl_inactive)(t)
196
197 #define CL_TICK(t) (*(t)->t_clfuncs->cl_tick)(t)
198
199 #define CL_TRAPRET(t) (*(t)->t_clfuncs->cl_trapret)(t)
200
201 #define CL_WAKEUP(t) (*(t)->t_clfuncs->cl_wakeup)(t)
202
203 #define CL_DONICE(t, cr, inc, ret) \
204 (*(t)->t_clfuncs->cl_donice)(t, cr, inc, ret)
205
206 #define CL_DOPRIO(t, cr, inc, ret) \
207 (*(t)->t_clfuncs->cl_doprio)(t, cr, inc, ret)
208
209 #define CL_GLOBPRI(t) (*(t)->t_clfuncs->cl_globpri)(t)
210
211 #define CL_SET_PROCESS_GROUP(t, s, b, f) \
212 (*(t)->t_clfuncs->cl_set_process_group)(s, b, f)
213
214 #define CL_YIELD(tp) (*(tp)->t_clfuncs->cl_yield)(tp)
215
|