MCPcopy Create free account
hub / github.com/F-Stack/f-stack / callout_lock

Function callout_lock

freebsd/kern/kern_timeout.c:541–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541static struct callout_cpu *
542callout_lock(struct callout *c)
543{
544 struct callout_cpu *cc;
545 int cpu;
546
547 for (;;) {
548 cpu = c->c_cpu;
549#ifdef SMP
550 if (cpu == CPUBLOCK) {
551 while (c->c_cpu == CPUBLOCK)
552 cpu_spinwait();
553 continue;
554 }
555#endif
556 cc = CC_CPU(cpu);
557 CC_LOCK(cc);
558 if (cpu == c->c_cpu)
559 break;
560 CC_UNLOCK(cc);
561 }
562 return (cc);
563}
564
565static void
566callout_cc_add(struct callout *c, struct callout_cpu *cc,

Callers 2

callout_reset_sbt_onFunction · 0.70
_callout_stop_safeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected