Lines Matching refs:clp
52 sclass_t *clp;
63 for (clp = sclass; clp < &sclass[nclass]; clp++)
64 if (clp->cl_name[0] == '\0' && clp->cl_lock == NULL)
67 if (clp == &sclass[nclass]) {
70 *cidp = clp - &sclass[0];
71 clp->cl_lock = kmem_alloc(sizeof (krwlock_t), KM_SLEEP);
72 clp->cl_name = kmem_alloc(strlen(clname) + 1, KM_SLEEP);
73 (void) strcpy(clp->cl_name, clname);
74 rw_init(clp->cl_lock, NULL, RW_DEFAULT, NULL);
85 scheduler_load(char *clname, sclass_t *clp)
95 if (LOADABLE_SCHED(clp)) {
96 rw_enter(clp->cl_lock, RW_READER);
97 if (!SCHED_INSTALLED(clp)) {
98 rw_exit(clp->cl_lock);
101 rw_enter(clp->cl_lock, RW_READER);
103 if (!SCHED_INSTALLED(clp))
106 rw_exit(clp->cl_lock);
117 sclass_t *clp;
122 clp = &sclass[*cidp];
123 clp->cl_count++;
133 retval = scheduler_load(clname, clp);
136 clp->cl_count--;
137 if (retval != 0 && clp->cl_count == 0) {
139 kmem_free(clp->cl_name, strlen(clname) + 1);
140 kmem_free(clp->cl_lock, sizeof (krwlock_t));
141 clp->cl_name = "";
142 clp->cl_lock = (krwlock_t *)NULL;
153 sclass_t *clp;
160 for (clp = &sclass[0]; clp < &sclass[nclass]; clp++) {
161 if (strcmp(clp->cl_name, clname) == 0) {
162 *cidp = clp - &sclass[0];