Lines Matching refs:ct
157 #define CALLOUT_APPEND(ct, cp) \ argument
158 CALLOUT_HASH_APPEND(ct->ct_idhash[CALLOUT_IDHASH(cp->c_xid)], \
162 #define CALLOUT_DELETE(ct, cp) \ argument
163 CALLOUT_HASH_DELETE(ct->ct_idhash[CALLOUT_IDHASH(cp->c_xid)], \
194 #define CALLOUT_EXEC_COMPUTE(ct, nextexp, exec) \ argument
198 cl = ct->ct_expired.ch_head; \
243 #define CALLOUT_LIST_FREE(ct, cl) \ argument
245 cl->cl_next = ct->ct_lfree; \
246 ct->ct_lfree = cl; \
253 #define CALLOUT_FREE(ct, cl) \ argument
255 cp->c_idnext = ct->ct_free; \
256 ct->ct_free = cp; \
267 callout_alloc(callout_table_t *ct) in callout_alloc() argument
272 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_alloc()
273 mutex_exit(&ct->ct_mutex); in callout_alloc()
275 cp = kmem_cache_alloc(ct->ct_cache, KM_NOSLEEP); in callout_alloc()
285 mutex_enter(&ct->ct_mutex); in callout_alloc()
286 ct->ct_allocations++; in callout_alloc()
297 callout_list_alloc(callout_table_t *ct) in callout_list_alloc() argument
302 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_list_alloc()
303 mutex_exit(&ct->ct_mutex); in callout_list_alloc()
305 cl = kmem_cache_alloc(ct->ct_lcache, KM_NOSLEEP); in callout_list_alloc()
312 mutex_enter(&ct->ct_mutex); in callout_list_alloc()
313 CALLOUT_LIST_FREE(ct, cl); in callout_list_alloc()
320 callout_list_get(callout_table_t *ct, hrtime_t expiration, int flags, int hash) in callout_list_get() argument
325 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_list_get()
336 for (cl = ct->ct_clhash[hash].ch_head; (cl != NULL); cl = cl->cl_next) { in callout_list_get()
358 callout_queue_add(callout_table_t *ct, callout_list_t *cl) in callout_queue_add() argument
364 nextcl = ct->ct_queue.ch_head; in callout_queue_add()
366 CALLOUT_LIST_INSERT(ct->ct_queue, cl); in callout_queue_add()
377 CALLOUT_LIST_APPEND(ct->ct_queue, cl); in callout_queue_add()
387 callout_queue_insert(callout_table_t *ct, callout_list_t *cl) in callout_queue_insert() argument
401 if (callout_queue_add(ct, cl) && (ct->ct_suspend == 0)) in callout_queue_insert()
402 (void) cyclic_reprogram(ct->ct_qcyclic, cl->cl_expiration); in callout_queue_insert()
409 callout_queue_delete(callout_table_t *ct) in callout_queue_delete() argument
414 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_queue_delete()
417 while ((cl = ct->ct_queue.ch_head) != NULL) { in callout_queue_delete()
421 CALLOUT_LIST_DELETE(ct->ct_queue, cl); in callout_queue_delete()
422 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_queue_delete()
429 if ((cl == NULL) || (ct->ct_suspend > 0)) in callout_queue_delete()
432 (void) cyclic_reprogram(ct->ct_qcyclic, cl->cl_expiration); in callout_queue_delete()
438 callout_queue_process(callout_table_t *ct, hrtime_t delta, int timechange) in callout_queue_process() argument
445 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_queue_process()
447 firstcl = ct->ct_queue.ch_head; in callout_queue_process()
457 temp = ct->ct_queue; in callout_queue_process()
458 ct->ct_queue.ch_head = NULL; in callout_queue_process()
459 ct->ct_queue.ch_tail = NULL; in callout_queue_process()
476 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_queue_process()
492 (void) callout_queue_add(ct, cl); in callout_queue_process()
501 if (ct->ct_expired.ch_head != NULL) in callout_queue_process()
504 cl = ct->ct_queue.ch_head; in callout_queue_process()
516 callout_heap_init(callout_table_t *ct) in callout_heap_init() argument
520 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_init()
521 ASSERT(ct->ct_heap == NULL); in callout_heap_init()
523 ct->ct_heap_num = 0; in callout_heap_init()
524 ct->ct_heap_max = callout_chunk; in callout_heap_init()
526 ct->ct_heap = kmem_alloc(size, KM_SLEEP); in callout_heap_init()
534 callout_heap_expand(callout_table_t *ct) in callout_heap_expand() argument
539 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_expand()
540 ASSERT(ct->ct_heap_num <= ct->ct_heap_max); in callout_heap_expand()
542 while (ct->ct_heap_num == ct->ct_heap_max) { in callout_heap_expand()
543 max = ct->ct_heap_max; in callout_heap_expand()
544 mutex_exit(&ct->ct_mutex); in callout_heap_expand()
550 mutex_enter(&ct->ct_mutex); in callout_heap_expand()
556 if (ct->ct_nreap > 0) in callout_heap_expand()
557 (void) callout_heap_process(ct, 0, 0); in callout_heap_expand()
562 if (ct->ct_heap_num == ct->ct_heap_max) in callout_heap_expand()
566 if (max < ct->ct_heap_max) { in callout_heap_expand()
575 bcopy(ct->ct_heap, heap, osize); in callout_heap_expand()
576 kmem_free(ct->ct_heap, osize); in callout_heap_expand()
577 ct->ct_heap = heap; in callout_heap_expand()
578 ct->ct_heap_max = size / sizeof (callout_heap_t); in callout_heap_expand()
590 callout_upheap(callout_table_t *ct) in callout_upheap() argument
595 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_upheap()
596 ASSERT(ct->ct_heap_num >= 1); in callout_upheap()
598 if (ct->ct_heap_num == 1) { in callout_upheap()
602 heap = ct->ct_heap; in callout_upheap()
603 current = ct->ct_heap_num - 1; in callout_upheap()
638 callout_heap_insert(callout_table_t *ct, callout_list_t *cl) in callout_heap_insert() argument
640 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_insert()
641 ASSERT(ct->ct_heap_num < ct->ct_heap_max); in callout_heap_insert()
648 ct->ct_heap[ct->ct_heap_num].ch_expiration = cl->cl_expiration; in callout_heap_insert()
649 ct->ct_heap[ct->ct_heap_num].ch_list = cl; in callout_heap_insert()
650 ct->ct_heap_num++; in callout_heap_insert()
662 if (callout_upheap(ct) && (ct->ct_suspend == 0)) in callout_heap_insert()
663 (void) cyclic_reprogram(ct->ct_cyclic, cl->cl_expiration); in callout_heap_insert()
671 callout_downheap(callout_table_t *ct) in callout_downheap() argument
676 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_downheap()
677 ASSERT(ct->ct_heap_num >= 1); in callout_downheap()
679 heap = ct->ct_heap; in callout_downheap()
681 nelems = ct->ct_heap_num; in callout_downheap()
750 callout_heap_delete(callout_table_t *ct) in callout_heap_delete() argument
757 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_delete()
759 if (CALLOUT_CLEANUP(ct)) { in callout_heap_delete()
764 (void) callout_heap_process(ct, 0, 0); in callout_heap_delete()
768 heap = ct->ct_heap; in callout_heap_delete()
770 while (ct->ct_heap_num > 0) { in callout_heap_delete()
781 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_delete()
782 CALLOUT_LIST_FREE(ct, cl); in callout_heap_delete()
783 ct->ct_nreap--; in callout_heap_delete()
798 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_delete()
799 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_heap_delete()
806 ct->ct_heap_num--; in callout_heap_delete()
807 if (ct->ct_heap_num > 0) { in callout_heap_delete()
808 heap[0] = heap[ct->ct_heap_num]; in callout_heap_delete()
809 callout_downheap(ct); in callout_heap_delete()
818 if ((ct->ct_heap_num == 0) || (ct->ct_suspend > 0)) in callout_heap_delete()
827 if (ct->ct_heap_num > 2) { in callout_heap_delete()
834 (void) cyclic_reprogram(ct->ct_cyclic, expiration); in callout_heap_delete()
860 callout_heap_process(callout_table_t *ct, hrtime_t delta, int timechange) in callout_heap_process() argument
868 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_heap_process()
870 if (ct->ct_heap_num == 0) in callout_heap_process()
873 if (ct->ct_nreap > 0) in callout_heap_process()
874 ct->ct_cleanups++; in callout_heap_process()
876 heap = ct->ct_heap; in callout_heap_process()
894 num = ct->ct_heap_num; in callout_heap_process()
895 ct->ct_heap_num = 0; in callout_heap_process()
906 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_process()
907 CALLOUT_LIST_FREE(ct, cl); in callout_heap_process()
922 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_process()
923 CALLOUT_LIST_APPEND(ct->ct_expired, cl); in callout_heap_process()
934 CALLOUT_LIST_DELETE(ct->ct_clhash[hash], cl); in callout_heap_process()
942 CALLOUT_LIST_APPEND(ct->ct_clhash[hash], cl); in callout_heap_process()
944 CALLOUT_LIST_INSERT(ct->ct_clhash[hash], cl); in callout_heap_process()
948 heap[ct->ct_heap_num] = heap[i]; in callout_heap_process()
949 ct->ct_heap_num++; in callout_heap_process()
950 (void) callout_upheap(ct); in callout_heap_process()
953 ct->ct_nreap = 0; in callout_heap_process()
961 if (ct->ct_expired.ch_head != NULL) in callout_heap_process()
964 if (ct->ct_heap_num == 0) in callout_heap_process()
984 callout_table_t *ct; in timeout_generic() local
1012 ct = &callout_table[CALLOUT_TABLE(type, CPU->cpu_seqid)]; in timeout_generic()
1013 mutex_enter(&ct->ct_mutex); in timeout_generic()
1015 if (ct->ct_cyclic == CYCLIC_NONE) { in timeout_generic()
1016 mutex_exit(&ct->ct_mutex); in timeout_generic()
1022 ct = &callout_boot_ct[type]; in timeout_generic()
1023 mutex_enter(&ct->ct_mutex); in timeout_generic()
1026 if (CALLOUT_CLEANUP(ct)) { in timeout_generic()
1033 (void) callout_heap_process(ct, 0, 0); in timeout_generic()
1036 if ((cp = ct->ct_free) == NULL) in timeout_generic()
1037 cp = callout_alloc(ct); in timeout_generic()
1039 ct->ct_free = cp->c_idnext; in timeout_generic()
1076 id = (ct->ct_long_id - callout_counter_low); in timeout_generic()
1078 ct->ct_long_id = id; in timeout_generic()
1080 id = (ct->ct_short_id - callout_counter_low); in timeout_generic()
1082 ct->ct_short_id = id; in timeout_generic()
1085 id = (ct->ct_gen_id - callout_counter_low); in timeout_generic()
1090 ct->ct_gen_id = id; in timeout_generic()
1108 cl = callout_list_get(ct, expiration, clflags, hash); in timeout_generic()
1114 if ((cl = ct->ct_lfree) == NULL) { in timeout_generic()
1115 callout_list_alloc(ct); in timeout_generic()
1127 ct->ct_lfree = cl->cl_next; in timeout_generic()
1135 if (ct->ct_heap_num == ct->ct_heap_max) { in timeout_generic()
1136 if (callout_heap_expand(ct) == 0) { in timeout_generic()
1140 callout_queue_insert(ct, cl); in timeout_generic()
1156 CALLOUT_LIST_APPEND(ct->ct_clhash[hash], cl); in timeout_generic()
1158 CALLOUT_LIST_INSERT(ct->ct_clhash[hash], cl); in timeout_generic()
1166 callout_heap_insert(ct, cl); in timeout_generic()
1174 ct->ct_nreap--; in timeout_generic()
1178 CALLOUT_APPEND(ct, cp); in timeout_generic()
1180 ct->ct_timeouts++; in timeout_generic()
1181 ct->ct_timeouts_pending++; in timeout_generic()
1183 mutex_exit(&ct->ct_mutex); in timeout_generic()
1281 callout_table_t *ct; in untimeout_generic() local
1288 ct = &callout_table[CALLOUT_ID_TO_TABLE(id)]; in untimeout_generic()
1291 mutex_enter(&ct->ct_mutex); in untimeout_generic()
1296 for (cp = ct->ct_idhash[hash].ch_head; cp; cp = cp->c_idnext) { in untimeout_generic()
1320 CALLOUT_DELETE(ct, cp); in untimeout_generic()
1321 CALLOUT_FREE(ct, cp); in untimeout_generic()
1322 ct->ct_untimeouts_unexpired++; in untimeout_generic()
1323 ct->ct_timeouts_pending--; in untimeout_generic()
1336 ct->ct_nreap++; in untimeout_generic()
1338 CALLOUT_LIST_DELETE(ct->ct_queue, cl); in untimeout_generic()
1339 CALLOUT_LIST_FREE(ct, cl); in untimeout_generic()
1341 CALLOUT_LIST_DELETE(ct->ct_expired, cl); in untimeout_generic()
1342 CALLOUT_LIST_FREE(ct, cl); in untimeout_generic()
1345 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1354 ct->ct_untimeouts_executing++; in untimeout_generic()
1369 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1383 cv_wait(&cp->c_done, &ct->ct_mutex); in untimeout_generic()
1386 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1391 ct->ct_untimeouts_expired++; in untimeout_generic()
1393 mutex_exit(&ct->ct_mutex); in untimeout_generic()
1454 callout_list_expire(callout_table_t *ct, callout_list_t *cl) in callout_list_expire() argument
1458 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_list_expire()
1478 mutex_exit(&ct->ct_mutex); in callout_list_expire()
1484 mutex_enter(&ct->ct_mutex); in callout_list_expire()
1486 ct->ct_expirations++; in callout_list_expire()
1487 ct->ct_timeouts_pending--; in callout_list_expire()
1500 CALLOUT_DELETE(ct, cp); in callout_list_expire()
1501 CALLOUT_FREE(ct, cp); in callout_list_expire()
1514 callout_expire(callout_table_t *ct) in callout_expire() argument
1518 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_expire()
1520 for (cl = ct->ct_expired.ch_head; (cl != NULL); cl = clnext) { in callout_expire()
1524 callout_list_expire(ct, cl); in callout_expire()
1531 CALLOUT_LIST_DELETE(ct->ct_expired, cl); in callout_expire()
1532 CALLOUT_LIST_FREE(ct, cl); in callout_expire()
1559 callout_realtime(callout_table_t *ct) in callout_realtime() argument
1561 mutex_enter(&ct->ct_mutex); in callout_realtime()
1562 (void) callout_heap_delete(ct); in callout_realtime()
1563 callout_expire(ct); in callout_realtime()
1564 mutex_exit(&ct->ct_mutex); in callout_realtime()
1568 callout_queue_realtime(callout_table_t *ct) in callout_queue_realtime() argument
1570 mutex_enter(&ct->ct_mutex); in callout_queue_realtime()
1571 (void) callout_queue_delete(ct); in callout_queue_realtime()
1572 callout_expire(ct); in callout_queue_realtime()
1573 mutex_exit(&ct->ct_mutex); in callout_queue_realtime()
1577 callout_execute(callout_table_t *ct) in callout_execute() argument
1579 mutex_enter(&ct->ct_mutex); in callout_execute()
1580 callout_expire(ct); in callout_execute()
1581 mutex_exit(&ct->ct_mutex); in callout_execute()
1588 callout_normal(callout_table_t *ct) in callout_normal() argument
1593 mutex_enter(&ct->ct_mutex); in callout_normal()
1594 exp = callout_heap_delete(ct); in callout_normal()
1595 CALLOUT_EXEC_COMPUTE(ct, exp, exec); in callout_normal()
1596 mutex_exit(&ct->ct_mutex); in callout_normal()
1599 ASSERT(ct->ct_taskq != NULL); in callout_normal()
1600 (void) taskq_dispatch(ct->ct_taskq, in callout_normal()
1601 (task_func_t *)callout_execute, ct, TQ_NOSLEEP); in callout_normal()
1606 callout_queue_normal(callout_table_t *ct) in callout_queue_normal() argument
1611 mutex_enter(&ct->ct_mutex); in callout_queue_normal()
1612 exp = callout_queue_delete(ct); in callout_queue_normal()
1613 CALLOUT_EXEC_COMPUTE(ct, exp, exec); in callout_queue_normal()
1614 mutex_exit(&ct->ct_mutex); in callout_queue_normal()
1617 ASSERT(ct->ct_taskq != NULL); in callout_queue_normal()
1618 (void) taskq_dispatch(ct->ct_taskq, in callout_queue_normal()
1619 (task_func_t *)callout_execute, ct, TQ_NOSLEEP); in callout_queue_normal()
1630 callout_table_t *ct; in callout_suspend() local
1642 ct = &callout_table[CALLOUT_TABLE(t, f)]; in callout_suspend()
1644 mutex_enter(&ct->ct_mutex); in callout_suspend()
1645 ct->ct_suspend++; in callout_suspend()
1646 if (ct->ct_cyclic == CYCLIC_NONE) { in callout_suspend()
1647 mutex_exit(&ct->ct_mutex); in callout_suspend()
1650 if (ct->ct_suspend == 1) { in callout_suspend()
1651 (void) cyclic_reprogram(ct->ct_cyclic, in callout_suspend()
1653 (void) cyclic_reprogram(ct->ct_qcyclic, in callout_suspend()
1656 mutex_exit(&ct->ct_mutex); in callout_suspend()
1669 callout_table_t *ct; in callout_resume() local
1678 ct = &callout_table[CALLOUT_TABLE(t, f)]; in callout_resume()
1680 mutex_enter(&ct->ct_mutex); in callout_resume()
1681 if (ct->ct_cyclic == CYCLIC_NONE) { in callout_resume()
1682 ct->ct_suspend--; in callout_resume()
1683 mutex_exit(&ct->ct_mutex); in callout_resume()
1694 hexp = callout_heap_process(ct, delta, timechange); in callout_resume()
1695 qexp = callout_queue_process(ct, delta, timechange); in callout_resume()
1697 ct->ct_suspend--; in callout_resume()
1698 if (ct->ct_suspend == 0) { in callout_resume()
1699 (void) cyclic_reprogram(ct->ct_cyclic, hexp); in callout_resume()
1700 (void) cyclic_reprogram(ct->ct_qcyclic, qexp); in callout_resume()
1703 mutex_exit(&ct->ct_mutex); in callout_resume()
1759 callout_hrestime_one(callout_table_t *ct) in callout_hrestime_one() argument
1763 mutex_enter(&ct->ct_mutex); in callout_hrestime_one()
1764 if (ct->ct_cyclic == CYCLIC_NONE) { in callout_hrestime_one()
1765 mutex_exit(&ct->ct_mutex); in callout_hrestime_one()
1772 hexp = callout_heap_process(ct, 0, 1); in callout_hrestime_one()
1773 qexp = callout_queue_process(ct, 0, 1); in callout_hrestime_one()
1775 if (ct->ct_suspend == 0) { in callout_hrestime_one()
1776 (void) cyclic_reprogram(ct->ct_cyclic, hexp); in callout_hrestime_one()
1777 (void) cyclic_reprogram(ct->ct_qcyclic, qexp); in callout_hrestime_one()
1780 mutex_exit(&ct->ct_mutex); in callout_hrestime_one()
1792 callout_table_t *ct; in callout_hrestime() local
1804 ct = &callout_table[CALLOUT_TABLE(t, f)]; in callout_hrestime()
1805 callout_hrestime_one(ct); in callout_hrestime()
1814 callout_hash_init(callout_table_t *ct) in callout_hash_init() argument
1818 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_hash_init()
1819 ASSERT((ct->ct_idhash == NULL) && (ct->ct_clhash == NULL)); in callout_hash_init()
1822 ct->ct_idhash = kmem_zalloc(size, KM_SLEEP); in callout_hash_init()
1823 ct->ct_clhash = kmem_zalloc(size, KM_SLEEP); in callout_hash_init()
1830 callout_kstat_init(callout_table_t *ct) in callout_kstat_init() argument
1836 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_kstat_init()
1837 ASSERT(ct->ct_kstats == NULL); in callout_kstat_init()
1839 ndx = ct - callout_table; in callout_kstat_init()
1845 (void *)ct); in callout_kstat_init()
1847 ct_kstats->ks_data = ct->ct_kstat_data; in callout_kstat_init()
1849 kstat_named_init(&ct->ct_kstat_data[stat], in callout_kstat_init()
1851 ct->ct_kstats = ct_kstats; in callout_kstat_init()
1857 callout_cyclic_init(callout_table_t *ct) in callout_cyclic_init() argument
1865 ASSERT(MUTEX_HELD(&ct->ct_mutex)); in callout_cyclic_init()
1867 t = ct->ct_type; in callout_cyclic_init()
1868 seqid = CALLOUT_TABLE_SEQID(ct); in callout_cyclic_init()
1876 ASSERT(ct->ct_taskq == NULL); in callout_cyclic_init()
1889 ct->ct_taskq = in callout_cyclic_init()
1900 ASSERT(ct->ct_heap_num == 0); in callout_cyclic_init()
1910 mutex_exit(&ct->ct_mutex); in callout_cyclic_init()
1922 ASSERT(ct->ct_cyclic == CYCLIC_NONE); in callout_cyclic_init()
1931 hdlr.cyh_arg = ct; in callout_cyclic_init()
1944 mutex_enter(&ct->ct_mutex); in callout_cyclic_init()
1945 ct->ct_cyclic = cyclic; in callout_cyclic_init()
1946 ct->ct_qcyclic = qcyclic; in callout_cyclic_init()
1955 callout_table_t *ct; in callout_cpu_online() local
1992 ct = &callout_table[CALLOUT_TABLE(t, seqid)]; in callout_cpu_online()
1994 mutex_enter(&ct->ct_mutex); in callout_cpu_online()
2001 ct->ct_cache = cache->cc_cache; in callout_cpu_online()
2002 ct->ct_lcache = cache->cc_lcache; in callout_cpu_online()
2008 if (ct->ct_heap == NULL) { in callout_cpu_online()
2009 callout_heap_init(ct); in callout_cpu_online()
2010 callout_hash_init(ct); in callout_cpu_online()
2011 callout_kstat_init(ct); in callout_cpu_online()
2012 callout_cyclic_init(ct); in callout_cpu_online()
2015 mutex_exit(&ct->ct_mutex); in callout_cpu_online()
2020 cyclic_bind(ct->ct_cyclic, cp, NULL); in callout_cpu_online()
2021 cyclic_bind(ct->ct_qcyclic, cp, NULL); in callout_cpu_online()
2028 callout_table_t *ct; in callout_cpu_offline() local
2037 ct = &callout_table[CALLOUT_TABLE(t, seqid)]; in callout_cpu_offline()
2043 cyclic_bind(ct->ct_cyclic, NULL, NULL); in callout_cpu_offline()
2044 cyclic_bind(ct->ct_qcyclic, NULL, NULL); in callout_cpu_offline()
2092 callout_table_t *ct; in callout_init() local
2147 ct = &callout_table[table_id]; in callout_init()
2148 ct->ct_type = t; in callout_init()
2149 mutex_init(&ct->ct_mutex, NULL, MUTEX_DEFAULT, NULL); in callout_init()
2155 ct->ct_short_id = CALLOUT_SHORT_ID(table_id); in callout_init()
2156 ct->ct_long_id = CALLOUT_LONG_ID(table_id); in callout_init()
2163 ct->ct_gen_id = CALLOUT_SHORT_ID(table_id); in callout_init()
2170 ct->ct_cyclic = CYCLIC_NONE; in callout_init()
2171 ct->ct_qcyclic = CYCLIC_NONE; in callout_init()
2172 ct->ct_kstat_data = kmem_zalloc(size, KM_SLEEP); in callout_init()