Lines Matching refs:ct

156 #define	CALLOUT_APPEND(ct, cp)						\  argument
157 CALLOUT_HASH_APPEND(ct->ct_idhash[CALLOUT_IDHASH(cp->c_xid)], \
161 #define CALLOUT_DELETE(ct, cp) \ argument
162 CALLOUT_HASH_DELETE(ct->ct_idhash[CALLOUT_IDHASH(cp->c_xid)], \
193 #define CALLOUT_EXEC_COMPUTE(ct, nextexp, exec) \ argument
197 cl = ct->ct_expired.ch_head; \
242 #define CALLOUT_LIST_FREE(ct, cl) \ argument
244 cl->cl_next = ct->ct_lfree; \
245 ct->ct_lfree = cl; \
252 #define CALLOUT_FREE(ct, cl) \ argument
254 cp->c_idnext = ct->ct_free; \
255 ct->ct_free = cp; \
266 callout_alloc(callout_table_t *ct) in callout_alloc() argument
271 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_alloc()
272 mutex_exit(&ct->ct_mutex); in callout_alloc()
274 cp = kmem_cache_alloc(ct->ct_cache, KM_NOSLEEP); in callout_alloc()
284 mutex_enter(&ct->ct_mutex); in callout_alloc()
285 ct->ct_allocations++; in callout_alloc()
296 callout_list_alloc(callout_table_t *ct) in callout_list_alloc() argument
301 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_list_alloc()
302 mutex_exit(&ct->ct_mutex); in callout_list_alloc()
304 cl = kmem_cache_alloc(ct->ct_lcache, KM_NOSLEEP); in callout_list_alloc()
311 mutex_enter(&ct->ct_mutex); in callout_list_alloc()
312 CALLOUT_LIST_FREE(ct, cl); in callout_list_alloc()
319 callout_list_get(callout_table_t *ct, hrtime_t expiration, int flags, int hash) in callout_list_get() argument
324 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_list_get()
335 for (cl = ct->ct_clhash[hash].ch_head; (cl != NULL); cl = cl->cl_next) { in callout_list_get()
357 callout_queue_add(callout_table_t *ct, callout_list_t *cl) in callout_queue_add() argument
363 nextcl = ct->ct_queue.ch_head; in callout_queue_add()
365 CALLOUT_LIST_INSERT(ct->ct_queue, cl); in callout_queue_add()
376 CALLOUT_LIST_APPEND(ct->ct_queue, cl); in callout_queue_add()
386 callout_queue_insert(callout_table_t *ct, callout_list_t *cl) in callout_queue_insert() argument
400 if (callout_queue_add(ct, cl) && (ct->ct_suspend == 0)) in callout_queue_insert()
401 (void) cyclic_reprogram(ct->ct_qcyclic, cl->cl_expiration); in callout_queue_insert()
408 callout_queue_delete(callout_table_t *ct) in callout_queue_delete() argument
413 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_queue_delete()
416 while ((cl = ct->ct_queue.ch_head) != NULL) { in callout_queue_delete()
420 CALLOUT_LIST_DELETE(ct->ct_queue, cl); in callout_queue_delete()
421 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_queue_delete()
428 if ((cl == NULL) || (ct->ct_suspend > 0)) in callout_queue_delete()
431 (void) cyclic_reprogram(ct->ct_qcyclic, cl->cl_expiration); in callout_queue_delete()
437 callout_queue_process(callout_table_t *ct, hrtime_t delta, int timechange) in callout_queue_process() argument
444 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_queue_process()
446 firstcl = ct->ct_queue.ch_head; in callout_queue_process()
456 temp = ct->ct_queue; in callout_queue_process()
457 ct->ct_queue.ch_head = NULL; in callout_queue_process()
458 ct->ct_queue.ch_tail = NULL; in callout_queue_process()
475 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_queue_process()
491 (void) callout_queue_add(ct, cl); in callout_queue_process()
500 if (ct->ct_expired.ch_head != NULL) in callout_queue_process()
503 cl = ct->ct_queue.ch_head; in callout_queue_process()
515 callout_heap_init(callout_table_t *ct) in callout_heap_init() argument
519 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_init()
520 ASSERT(ct->ct_heap == NULL); in callout_heap_init()
522 ct->ct_heap_num = 0; in callout_heap_init()
523 ct->ct_heap_max = callout_chunk; in callout_heap_init()
525 ct->ct_heap = kmem_alloc(size, KM_SLEEP); in callout_heap_init()
533 callout_heap_expand(callout_table_t *ct) in callout_heap_expand() argument
538 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_expand()
539 ASSERT(ct->ct_heap_num <= ct->ct_heap_max); in callout_heap_expand()
541 while (ct->ct_heap_num == ct->ct_heap_max) { in callout_heap_expand()
542 max = ct->ct_heap_max; in callout_heap_expand()
543 mutex_exit(&ct->ct_mutex); in callout_heap_expand()
549 mutex_enter(&ct->ct_mutex); in callout_heap_expand()
555 if (ct->ct_nreap > 0) in callout_heap_expand()
556 (void) callout_heap_process(ct, 0, 0); in callout_heap_expand()
561 if (ct->ct_heap_num == ct->ct_heap_max) in callout_heap_expand()
565 if (max < ct->ct_heap_max) { in callout_heap_expand()
574 bcopy(ct->ct_heap, heap, osize); in callout_heap_expand()
575 kmem_free(ct->ct_heap, osize); in callout_heap_expand()
576 ct->ct_heap = heap; in callout_heap_expand()
577 ct->ct_heap_max = size / sizeof (callout_heap_t); in callout_heap_expand()
589 callout_upheap(callout_table_t *ct) in callout_upheap() argument
594 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_upheap()
595 ASSERT(ct->ct_heap_num >= 1); in callout_upheap()
597 if (ct->ct_heap_num == 1) { in callout_upheap()
601 heap = ct->ct_heap; in callout_upheap()
602 current = ct->ct_heap_num - 1; in callout_upheap()
637 callout_heap_insert(callout_table_t *ct, callout_list_t *cl) in callout_heap_insert() argument
639 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_insert()
640 ASSERT(ct->ct_heap_num < ct->ct_heap_max); in callout_heap_insert()
647 ct->ct_heap[ct->ct_heap_num].ch_expiration = cl->cl_expiration; in callout_heap_insert()
648 ct->ct_heap[ct->ct_heap_num].ch_list = cl; in callout_heap_insert()
649 ct->ct_heap_num++; in callout_heap_insert()
661 if (callout_upheap(ct) && (ct->ct_suspend == 0)) in callout_heap_insert()
662 (void) cyclic_reprogram(ct->ct_cyclic, cl->cl_expiration); in callout_heap_insert()
670 callout_downheap(callout_table_t *ct) in callout_downheap() argument
675 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_downheap()
676 ASSERT(ct->ct_heap_num >= 1); in callout_downheap()
678 heap = ct->ct_heap; in callout_downheap()
680 nelems = ct->ct_heap_num; in callout_downheap()
749 callout_heap_delete(callout_table_t *ct) in callout_heap_delete() argument
756 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_delete()
758 if (CALLOUT_CLEANUP(ct)) { in callout_heap_delete()
763 (void) callout_heap_process(ct, 0, 0); in callout_heap_delete()
767 heap = ct->ct_heap; in callout_heap_delete()
769 while (ct->ct_heap_num > 0) { in callout_heap_delete()
780 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_delete()
781 CALLOUT_LIST_FREE(ct, cl); in callout_heap_delete()
782 ct->ct_nreap--; in callout_heap_delete()
797 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_delete()
798 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_heap_delete()
805 ct->ct_heap_num--; in callout_heap_delete()
806 if (ct->ct_heap_num > 0) { in callout_heap_delete()
807 heap[0] = heap[ct->ct_heap_num]; in callout_heap_delete()
808 callout_downheap(ct); in callout_heap_delete()
817 if ((ct->ct_heap_num == 0) || (ct->ct_suspend > 0)) in callout_heap_delete()
826 if (ct->ct_heap_num > 2) { in callout_heap_delete()
833 (void) cyclic_reprogram(ct->ct_cyclic, expiration); in callout_heap_delete()
859 callout_heap_process(callout_table_t *ct, hrtime_t delta, int timechange) in callout_heap_process() argument
867 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_process()
869 if (ct->ct_heap_num == 0) in callout_heap_process()
872 if (ct->ct_nreap > 0) in callout_heap_process()
873 ct->ct_cleanups++; in callout_heap_process()
875 heap = ct->ct_heap; in callout_heap_process()
893 num = ct->ct_heap_num; in callout_heap_process()
894 ct->ct_heap_num = 0; in callout_heap_process()
905 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_process()
906 CALLOUT_LIST_FREE(ct, cl); in callout_heap_process()
921 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_process()
922 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_heap_process()
933 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_process()
941 CALLOUT_LIST_APPEND(ct->ct_clhash[hash], cl); in callout_heap_process()
943 CALLOUT_LIST_INSERT(ct->ct_clhash[hash], cl); in callout_heap_process()
947 heap[ct->ct_heap_num] = heap[i]; in callout_heap_process()
948 ct->ct_heap_num++; in callout_heap_process()
949 (void) callout_upheap(ct); in callout_heap_process()
952 ct->ct_nreap = 0; in callout_heap_process()
960 if (ct->ct_expired.ch_head != NULL) in callout_heap_process()
963 if (ct->ct_heap_num == 0) in callout_heap_process()
983 callout_table_t *ct; in timeout_generic() local
1011 ct = &callout_table[CALLOUT_TABLE(type, CPU->cpu_seqid)]; in timeout_generic()
1012 mutex_enter(&ct->ct_mutex); in timeout_generic()
1014 if (ct->ct_cyclic == CYCLIC_NONE) { in timeout_generic()
1015 mutex_exit(&ct->ct_mutex); in timeout_generic()
1021 ct = &callout_boot_ct[type]; in timeout_generic()
1022 mutex_enter(&ct->ct_mutex); in timeout_generic()
1025 if (CALLOUT_CLEANUP(ct)) { in timeout_generic()
1032 (void) callout_heap_process(ct, 0, 0); in timeout_generic()
1035 if ((cp = ct->ct_free) == NULL) in timeout_generic()
1036 cp = callout_alloc(ct); in timeout_generic()
1038 ct->ct_free = cp->c_idnext; in timeout_generic()
1075 id = (ct->ct_long_id - callout_counter_low); in timeout_generic()
1077 ct->ct_long_id = id; in timeout_generic()
1079 id = (ct->ct_short_id - callout_counter_low); in timeout_generic()
1081 ct->ct_short_id = id; in timeout_generic()
1084 id = (ct->ct_gen_id - callout_counter_low); in timeout_generic()
1089 ct->ct_gen_id = id; in timeout_generic()
1107 cl = callout_list_get(ct, expiration, clflags, hash); in timeout_generic()
1113 if ((cl = ct->ct_lfree) == NULL) { in timeout_generic()
1114 callout_list_alloc(ct); in timeout_generic()
1126 ct->ct_lfree = cl->cl_next; in timeout_generic()
1134 if (ct->ct_heap_num == ct->ct_heap_max) { in timeout_generic()
1135 if (callout_heap_expand(ct) == 0) { in timeout_generic()
1139 callout_queue_insert(ct, cl); in timeout_generic()
1155 CALLOUT_LIST_APPEND(ct->ct_clhash[hash], cl); in timeout_generic()
1157 CALLOUT_LIST_INSERT(ct->ct_clhash[hash], cl); in timeout_generic()
1165 callout_heap_insert(ct, cl); in timeout_generic()
1173 ct->ct_nreap--; in timeout_generic()
1177 CALLOUT_APPEND(ct, cp); in timeout_generic()
1179 ct->ct_timeouts++; in timeout_generic()
1180 ct->ct_timeouts_pending++; in timeout_generic()
1182 mutex_exit(&ct->ct_mutex); in timeout_generic()
1280 callout_table_t *ct; in untimeout_generic() local
1287 ct = &callout_table[CALLOUT_ID_TO_TABLE(id)]; in untimeout_generic()
1290 mutex_enter(&ct->ct_mutex); in untimeout_generic()
1295 for (cp = ct->ct_idhash[hash].ch_head; cp; cp = cp->c_idnext) { in untimeout_generic()
1319 CALLOUT_DELETE(ct, cp); in untimeout_generic()
1320 CALLOUT_FREE(ct, cp); in untimeout_generic()
1321 ct->ct_untimeouts_unexpired++; in untimeout_generic()
1322 ct->ct_timeouts_pending--; in untimeout_generic()
1335 ct->ct_nreap++; in untimeout_generic()
1337 CALLOUT_LIST_DELETE(ct->ct_queue, cl); in untimeout_generic()
1338 CALLOUT_LIST_FREE(ct, cl); in untimeout_generic()
1340 CALLOUT_LIST_DELETE(ct->ct_expired, cl); in untimeout_generic()
1341 CALLOUT_LIST_FREE(ct, cl); in untimeout_generic()
1344 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1353 ct->ct_untimeouts_executing++; in untimeout_generic()
1368 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1382 cv_wait(&cp->c_done, &ct->ct_mutex); in untimeout_generic()
1385 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1390 ct->ct_untimeouts_expired++; in untimeout_generic()
1392 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1453 callout_list_expire(callout_table_t *ct, callout_list_t *cl) in callout_list_expire() argument
1457 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_list_expire()
1477 mutex_exit(&ct->ct_mutex); in callout_list_expire()
1483 mutex_enter(&ct->ct_mutex); in callout_list_expire()
1485 ct->ct_expirations++; in callout_list_expire()
1486 ct->ct_timeouts_pending--; in callout_list_expire()
1499 CALLOUT_DELETE(ct, cp); in callout_list_expire()
1500 CALLOUT_FREE(ct, cp); in callout_list_expire()
1513 callout_expire(callout_table_t *ct) in callout_expire() argument
1517 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_expire()
1519 for (cl = ct->ct_expired.ch_head; (cl != NULL); cl = clnext) { in callout_expire()
1523 callout_list_expire(ct, cl); in callout_expire()
1530 CALLOUT_LIST_DELETE(ct->ct_expired, cl); in callout_expire()
1531 CALLOUT_LIST_FREE(ct, cl); in callout_expire()
1558 callout_realtime(callout_table_t *ct) in callout_realtime() argument
1560 mutex_enter(&ct->ct_mutex); in callout_realtime()
1561 (void) callout_heap_delete(ct); in callout_realtime()
1562 callout_expire(ct); in callout_realtime()
1563 mutex_exit(&ct->ct_mutex); in callout_realtime()
1567 callout_queue_realtime(callout_table_t *ct) in callout_queue_realtime() argument
1569 mutex_enter(&ct->ct_mutex); in callout_queue_realtime()
1570 (void) callout_queue_delete(ct); in callout_queue_realtime()
1571 callout_expire(ct); in callout_queue_realtime()
1572 mutex_exit(&ct->ct_mutex); in callout_queue_realtime()
1576 callout_execute(callout_table_t *ct) in callout_execute() argument
1578 mutex_enter(&ct->ct_mutex); in callout_execute()
1579 callout_expire(ct); in callout_execute()
1580 mutex_exit(&ct->ct_mutex); in callout_execute()
1587 callout_normal(callout_table_t *ct) in callout_normal() argument
1592 mutex_enter(&ct->ct_mutex); in callout_normal()
1593 exp = callout_heap_delete(ct); in callout_normal()
1594 CALLOUT_EXEC_COMPUTE(ct, exp, exec); in callout_normal()
1595 mutex_exit(&ct->ct_mutex); in callout_normal()
1598 ASSERT(ct->ct_taskq != NULL); in callout_normal()
1599 (void) taskq_dispatch(ct->ct_taskq, in callout_normal()
1600 (task_func_t *)callout_execute, ct, TQ_NOSLEEP); in callout_normal()
1605 callout_queue_normal(callout_table_t *ct) in callout_queue_normal() argument
1610 mutex_enter(&ct->ct_mutex); in callout_queue_normal()
1611 exp = callout_queue_delete(ct); in callout_queue_normal()
1612 CALLOUT_EXEC_COMPUTE(ct, exp, exec); in callout_queue_normal()
1613 mutex_exit(&ct->ct_mutex); in callout_queue_normal()
1616 ASSERT(ct->ct_taskq != NULL); in callout_queue_normal()
1617 (void) taskq_dispatch(ct->ct_taskq, in callout_queue_normal()
1618 (task_func_t *)callout_execute, ct, TQ_NOSLEEP); in callout_queue_normal()
1629 callout_table_t *ct; in callout_suspend() local
1641 ct = &callout_table[CALLOUT_TABLE(t, f)]; in callout_suspend()
1643 mutex_enter(&ct->ct_mutex); in callout_suspend()
1644 ct->ct_suspend++; in callout_suspend()
1645 if (ct->ct_cyclic == CYCLIC_NONE) { in callout_suspend()
1646 mutex_exit(&ct->ct_mutex); in callout_suspend()
1649 if (ct->ct_suspend == 1) { in callout_suspend()
1650 (void) cyclic_reprogram(ct->ct_cyclic, in callout_suspend()
1652 (void) cyclic_reprogram(ct->ct_qcyclic, in callout_suspend()
1655 mutex_exit(&ct->ct_mutex); in callout_suspend()
1668 callout_table_t *ct; in callout_resume() local
1677 ct = &callout_table[CALLOUT_TABLE(t, f)]; in callout_resume()
1679 mutex_enter(&ct->ct_mutex); in callout_resume()
1680 if (ct->ct_cyclic == CYCLIC_NONE) { in callout_resume()
1681 ct->ct_suspend--; in callout_resume()
1682 mutex_exit(&ct->ct_mutex); in callout_resume()
1693 hexp = callout_heap_process(ct, delta, timechange); in callout_resume()
1694 qexp = callout_queue_process(ct, delta, timechange); in callout_resume()
1696 ct->ct_suspend--; in callout_resume()
1697 if (ct->ct_suspend == 0) { in callout_resume()
1698 (void) cyclic_reprogram(ct->ct_cyclic, hexp); in callout_resume()
1699 (void) cyclic_reprogram(ct->ct_qcyclic, qexp); in callout_resume()
1702 mutex_exit(&ct->ct_mutex); in callout_resume()
1758 callout_hrestime_one(callout_table_t *ct) in callout_hrestime_one() argument
1762 mutex_enter(&ct->ct_mutex); in callout_hrestime_one()
1763 if (ct->ct_cyclic == CYCLIC_NONE) { in callout_hrestime_one()
1764 mutex_exit(&ct->ct_mutex); in callout_hrestime_one()
1771 hexp = callout_heap_process(ct, 0, 1); in callout_hrestime_one()
1772 qexp = callout_queue_process(ct, 0, 1); in callout_hrestime_one()
1774 if (ct->ct_suspend == 0) { in callout_hrestime_one()
1775 (void) cyclic_reprogram(ct->ct_cyclic, hexp); in callout_hrestime_one()
1776 (void) cyclic_reprogram(ct->ct_qcyclic, qexp); in callout_hrestime_one()
1779 mutex_exit(&ct->ct_mutex); in callout_hrestime_one()
1791 callout_table_t *ct; in callout_hrestime() local
1803 ct = &callout_table[CALLOUT_TABLE(t, f)]; in callout_hrestime()
1804 callout_hrestime_one(ct); in callout_hrestime()
1813 callout_hash_init(callout_table_t *ct) in callout_hash_init() argument
1817 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_hash_init()
1818 ASSERT((ct->ct_idhash == NULL) && (ct->ct_clhash == NULL)); in callout_hash_init()
1821 ct->ct_idhash = kmem_zalloc(size, KM_SLEEP); in callout_hash_init()
1822 ct->ct_clhash = kmem_zalloc(size, KM_SLEEP); in callout_hash_init()
1829 callout_kstat_init(callout_table_t *ct) in callout_kstat_init() argument
1835 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_kstat_init()
1836 ASSERT(ct->ct_kstats == NULL); in callout_kstat_init()
1838 ndx = ct - callout_table; in callout_kstat_init()
1844 (void *)ct); in callout_kstat_init()
1846 ct_kstats->ks_data = ct->ct_kstat_data; in callout_kstat_init()
1848 kstat_named_init(&ct->ct_kstat_data[stat], in callout_kstat_init()
1850 ct->ct_kstats = ct_kstats; in callout_kstat_init()
1856 callout_cyclic_init(callout_table_t *ct) in callout_cyclic_init() argument
1864 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_cyclic_init()
1866 t = ct->ct_type; in callout_cyclic_init()
1867 seqid = CALLOUT_TABLE_SEQID(ct); in callout_cyclic_init()
1875 ASSERT(ct->ct_taskq == NULL); in callout_cyclic_init()
1888 ct->ct_taskq = in callout_cyclic_init()
1899 ASSERT(ct->ct_heap_num == 0); in callout_cyclic_init()
1909 mutex_exit(&ct->ct_mutex); in callout_cyclic_init()
1921 ASSERT(ct->ct_cyclic == CYCLIC_NONE); in callout_cyclic_init()
1930 hdlr.cyh_arg = ct; in callout_cyclic_init()
1943 mutex_enter(&ct->ct_mutex); in callout_cyclic_init()
1944 ct->ct_cyclic = cyclic; in callout_cyclic_init()
1945 ct->ct_qcyclic = qcyclic; in callout_cyclic_init()
1954 callout_table_t *ct; in callout_cpu_online() local
1991 ct = &callout_table[CALLOUT_TABLE(t, seqid)]; in callout_cpu_online()
1993 mutex_enter(&ct->ct_mutex); in callout_cpu_online()
2000 ct->ct_cache = cache->cc_cache; in callout_cpu_online()
2001 ct->ct_lcache = cache->cc_lcache; in callout_cpu_online()
2007 if (ct->ct_heap == NULL) { in callout_cpu_online()
2008 callout_heap_init(ct); in callout_cpu_online()
2009 callout_hash_init(ct); in callout_cpu_online()
2010 callout_kstat_init(ct); in callout_cpu_online()
2011 callout_cyclic_init(ct); in callout_cpu_online()
2014 mutex_exit(&ct->ct_mutex); in callout_cpu_online()
2019 cyclic_bind(ct->ct_cyclic, cp, NULL); in callout_cpu_online()
2020 cyclic_bind(ct->ct_qcyclic, cp, NULL); in callout_cpu_online()
2027 callout_table_t *ct; in callout_cpu_offline() local
2036 ct = &callout_table[CALLOUT_TABLE(t, seqid)]; in callout_cpu_offline()
2042 cyclic_bind(ct->ct_cyclic, NULL, NULL); in callout_cpu_offline()
2043 cyclic_bind(ct->ct_qcyclic, NULL, NULL); in callout_cpu_offline()
2091 callout_table_t *ct; in callout_init() local
2146 ct = &callout_table[table_id]; in callout_init()
2147 ct->ct_type = t; in callout_init()
2148 mutex_init(&ct->ct_mutex, NULL, MUTEX_DEFAULT, NULL); in callout_init()
2154 ct->ct_short_id = CALLOUT_SHORT_ID(table_id); in callout_init()
2155 ct->ct_long_id = CALLOUT_LONG_ID(table_id); in callout_init()
2162 ct->ct_gen_id = CALLOUT_SHORT_ID(table_id); in callout_init()
2169 ct->ct_cyclic = CYCLIC_NONE; in callout_init()
2170 ct->ct_qcyclic = CYCLIC_NONE; in callout_init()
2171 ct->ct_kstat_data = kmem_zalloc(size, KM_SLEEP); in callout_init()