Lines Matching refs:ct
89 static callb_table_t *ct = &callb_table;
111 mutex_enter(&ct->ct_lock);
113 while ((cp = ct->ct_freelist) != NULL) {
114 ct->ct_freelist = cp->c_next;
115 ct->ct_ncallb--;
118 if (ct->ct_ncallb == 0)
121 mutex_exit(&ct->ct_lock);
122 tsleep(ct, 0, "callb", hz / 4);
123 mutex_enter(&ct->ct_lock);
125 if (ct->ct_ncallb > 0)
126 printf("%s: Leaked %d callbacks!\n", __func__, ct->ct_ncallb);
127 mutex_exit(&ct->ct_lock);
143 mutex_enter(&ct->ct_lock);
144 while (ct->ct_busy)
145 cv_wait(&ct->ct_busy_cv, &ct->ct_lock);
146 if ((cp = ct->ct_freelist) == NULL) {
147 ct->ct_ncallb++;
150 ct->ct_freelist = cp->c_next;
168 cp->c_next = ct->ct_first_cb[class];
169 ct->ct_first_cb[class] = cp;
171 mutex_exit(&ct->ct_lock);
212 mutex_enter(&ct->ct_lock);
215 pp = &ct->ct_first_cb[me->c_class];
223 mutex_exit(&ct->ct_lock);
235 cv_wait(&me->c_done_cv, &ct->ct_lock);
242 me->c_next = ct->ct_freelist;
243 ct->ct_freelist = me;
245 mutex_exit(&ct->ct_lock);
263 mutex_enter(&ct->ct_lock);
265 for (cp = ct->ct_first_cb[class];
268 cv_wait(&cp->c_done_cv, &ct->ct_lock);
281 mutex_exit(&ct->ct_lock);
285 mutex_enter(&ct->ct_lock);
290 mutex_exit(&ct->ct_lock);
352 mutex_enter(&ct->ct_lock);
353 ASSERT(ct->ct_busy == 0);
354 ct->ct_busy = 1;
355 mutex_exit(&ct->ct_lock);
364 mutex_enter(&ct->ct_lock);
365 ASSERT(ct->ct_busy != 0);
366 ct->ct_busy = 0;
367 cv_broadcast(&ct->ct_busy_cv);
368 mutex_exit(&ct->ct_lock);
383 mutex_enter(&ct->ct_lock);
385 for (cp = ct->ct_first_cb[CB_CL_CPR_DAEMON];
432 mutex_exit(&ct->ct_lock);