Lines Matching refs:pccp
83 const pcclass_t *pccp;
86 for (policy = 0, pccp = sched_class;
88 policy++, pccp++) {
89 if (strcmp(clname, pccp->pcc_info.pc_clname) == 0)
101 pcclass_t *pccp = &sched_class[policy];
106 if ((uint_t)policy >= NPOLICY || pccp->pcc_state < 0) {
111 if (pccp->pcc_state > 0)
112 return (pccp);
117 if (pccp->pcc_policy == -1) {
120 pccp->pcc_info.pc_cid = policy - _SCHED_NEXT;
121 if (priocntl(0, 0, PC_GETCLINFO, &pccp->pcc_info) == -1 ||
122 (base = is_base_class(pccp->pcc_info.pc_clname)) != 0) {
123 pccp->pcc_info.pc_clname[0] = '\0';
124 pccp->pcc_info.pc_cid = -1;
132 pccp->pcc_state = -1;
138 pccp->pcc_policy = policy;
140 priocntl(0, 0, PC_GETCID, &pccp->pcc_info) == -1) {
142 pccp->pcc_state = -1;
150 prio = ((tsinfo_t *)pccp->pcc_info.pc_clinfo)->ts_maxupri;
151 pccp->pcc_primin = -prio;
152 pccp->pcc_primax = prio;
156 prio = ((rtinfo_t *)pccp->pcc_info.pc_clinfo)->rt_maxpri;
157 pccp->pcc_primin = 0;
158 pccp->pcc_primax = prio;
165 pcpri.pc_cid = pccp->pcc_info.pc_cid;
167 pccp->pcc_primin = pcpri.pc_clpmin;
168 pccp->pcc_primax = pcpri.pc_clpmax;
174 pccp->pcc_state = 1;
176 return (pccp);
183 pcclass_t *pccp;
192 for (policy = 0, pccp = sched_class;
194 policy++, pccp++) {
195 if (pccp->pcc_state > 0 && pccp->pcc_info.pc_cid == classid)
196 return (pccp);
206 for (policy = 0, pccp = sched_class;
208 policy++, pccp++) {
209 if (pccp->pcc_state == 0 &&
210 strcmp(pcinfo.pc_clname, pccp->pcc_info.pc_clname) == 0)
211 return (get_info_by_policy(pccp->pcc_policy));
225 pccp = &sched_class[policy];
226 pccp->pcc_policy = policy;
227 (void) strlcpy(pccp->pcc_info.pc_clname, pcinfo.pc_clname, PC_CLNMSZ);
229 return (get_info_by_policy(pccp->pcc_policy));
304 const pcclass_t *pccp;
306 if ((pccp = get_parms(idtype, id, &pcparm)) == NULL)
308 if (prio < pccp->pcc_primin || prio > pccp->pcc_primax) {
313 policy = pccp->pcc_policy;
324 return (pccp->pcc_info.pc_cid);
346 const pcclass_t *pccp;
350 if ((pccp = get_parms(idtype, id, &pcparm)) == NULL)
353 switch (policy = pccp->pcc_policy) {
419 const pcclass_t *pccp;
422 (pccp = get_info_by_policy(policy)) == NULL ||
423 prio < pccp->pcc_primin || prio > pccp->pcc_primax) {
428 pcparm.pc_cid = pccp->pcc_info.pc_cid;
431 return (pccp->pcc_info.pc_cid);
456 const pcclass_t *pccp;
466 if ((pccp = get_parms(P_PID, pid, &pcparm)) == NULL)
469 if ((policy = pccp->pcc_policy) == SCHED_FIFO || policy == SCHED_RR) {
488 const pcclass_t *pccp;
490 if ((pccp = get_info_by_policy(policy)) != NULL)
491 return (pccp->pcc_primax);
499 const pcclass_t *pccp;
501 if ((pccp = get_info_by_policy(policy)) != NULL)
502 return (pccp->pcc_primin);
511 const pcclass_t *pccp;
520 if ((pccp = get_parms(P_PID, pid, &pcparm)) == NULL)
533 switch (pccp->pcc_policy) {
567 const pcclass_t *pccp;
595 pccp = get_parms(P_LWPID, P_MYID, &pcparm);
596 if (pccp == NULL) { /* can't happen? */
605 switch (policy = pccp->pcc_policy) {
611 self->ul_rtclassid = pccp->pcc_info.pc_cid;