MCPcopy Index your code
hub / github.com/F-Stack/f-stack / callout_tick

Function callout_tick

lib/ff_kern_timeout.c:303–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303void
304callout_tick(void)
305{
306 struct callout_cpu *cc;
307 int need_softclock;
308 int bucket;
309
310 /*
311 * Process callouts at a very low cpu priority, so we don't keep the
312 * relatively high clock interrupt priority any longer than necessary.
313 */
314 need_softclock = 0;
315 cc = CC_SELF();
316 mtx_lock(&cc->cc_lock);
317 for (; (cc->cc_softticks - ticks) < 0; cc->cc_softticks++) {
318 bucket = cc->cc_softticks & callwheelmask;
319 if (!LIST_EMPTY(&cc->cc_callwheel[bucket])) {
320 need_softclock = 1;
321 break;
322 }
323 }
324 mtx_unlock(&cc->cc_lock);
325 /*
326 * swi_sched acquires the thread lock, so we don't want to call it
327 * with cc_lock held; incorrect locking order.
328 */
329 if (need_softclock)
330 softclock(cc);
331}
332
333static struct callout_cpu *
334callout_lock(struct callout *c)

Callers 1

ff_hardclockFunction · 0.85

Calls 3

softclockFunction · 0.70
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected