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

Function poll_idle

freebsd/kern/kern_poll.c:552–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552static void
553poll_idle(void)
554{
555 struct thread *td = curthread;
556 struct rtprio rtp;
557
558 rtp.prio = RTP_PRIO_MAX; /* lowest priority */
559 rtp.type = RTP_PRIO_IDLE;
560 PROC_SLOCK(td->td_proc);
561 rtp_to_pri(&rtp, td);
562 PROC_SUNLOCK(td->td_proc);
563
564 for (;;) {
565 if (poll_in_idle_loop && poll_handlers > 0) {
566 idlepoll_sleeping = 0;
567 ether_poll(poll_each_burst);
568 thread_lock(td);
569 mi_switch(SW_VOL);
570 } else {
571 idlepoll_sleeping = 1;
572 tsleep(&idlepoll_sleeping, 0, "pollid", hz * 3);
573 }
574 }
575}
576
577static struct proc *idlepoll;
578static struct kproc_desc idlepoll_kp = {

Callers

nothing calls this directly

Calls 3

rtp_to_priFunction · 0.85
ether_pollFunction · 0.85
mi_switchFunction · 0.70

Tested by

no test coverage detected