Lines Matching defs:callout
50 * The callout mechanism provides general-purpose event scheduling:
52 * The expiration time for a callout is kept in its callout list
55 typedef struct callout {
56 struct callout *c_idnext; /* next in ID hash, or on freelist */
57 struct callout *c_idprev; /* prev in ID hash */
58 struct callout *c_clnext; /* next in callout list */
59 struct callout *c_clprev; /* prev in callout list */
60 callout_id_t c_xid; /* extended callout ID; see below */
61 callout_list_t *c_list; /* callout list */
65 kcondvar_t c_done; /* signal callout completion */
70 * The callout ID (callout_id_t) uniquely identifies a callout. The callout
87 * Here is the bit layout for the callout ID:
96 * This bit indicates that this callout has been freed. This is for
100 * This is the executing bit which is only set in the extended callout
101 * ID. This bit indicates that the callout handler is currently being
108 * This bit indicates whether this is a short-term or a long-term callout.
109 * The long-term bit exists to address the problem of callout ID collision
111 * generates a large number of timeout() requests, which means that callout
119 * in case 32-bit systems grow in size and are able to consume callout IDs
125 * These bits represent the actual ID bits in the callout ID.
127 * the callout ID is always non-zero, thus eliminating the need for an
131 * These bits carry the table number for the callout table where the callout
132 * is queued. Each CPU has its own callout table. So, the callout tables are
138 * This bit represents the callout (table) type. Each CPU has one realtime
139 * and one normal callout table.
187 #define CALLOUT_REALTIME 0 /* realtime callout type */
188 #define CALLOUT_NORMAL 1 /* normal callout type */
199 * NOTE: Free callout_t's go to a callout table's freelist. CPUs map to callout
212 * The callout hash structure is used for queueing both callouts and
213 * callout lists. That is why the fields are declared as void *.
230 * Callout list is present in the callout heap.
232 * Callout list is present in the callout queue.
246 int cl_flags; /* callout flags */
251 * as well as the corresponding callout list. This is to avoid a lookup
252 * of the callout list when the heap is processed. Because we store the
253 * callout list pointer in the heap element, we have to always remove
254 * a heap element and its callout list together. We cannot remove one
269 * When the heap contains too many empty callout lists, it needs to be
279 * Per-callout table kstats.
296 * Number of callout structures allocated.
298 * Number of times a callout table is cleaned up.
324 * (hrestime). This flag is used to create a callout that is affected
326 * handled in a special way (see callout.c). These are used by condition
349 * All of the state information associated with a callout table.
353 kmutex_t ct_mutex; /* protects all callout state */
354 callout_t *ct_free; /* free callout structures */
355 callout_list_t *ct_lfree; /* free callout list structures */
359 callout_hash_t *ct_clhash; /* callout list hash */
360 kstat_named_t *ct_kstat_data; /* callout kstat data */
362 uint_t ct_type; /* callout table type */
365 callout_heap_t *ct_heap; /* callout expiration heap */
368 kmem_cache_t *ct_cache; /* callout kmem cache */
369 kmem_cache_t *ct_lcache; /* callout list kmem cache */
372 callout_hash_t ct_expired; /* list of expired callout lists */
374 kstat_t *ct_kstats; /* callout kstats */
376 cyclic_id_t ct_qcyclic; /* cyclic for the callout queue */
389 * Short hand definitions for the callout kstats.
415 * CALLOUT_MIN_HEAP_SIZE defines the minimum size for the callout heap for
422 * can be allocated towards the callout heap for the whole system.