| 550 | } |
| 551 | |
| 552 | static void |
| 553 | poll_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 | |
| 577 | static struct proc *idlepoll; |
| 578 | static struct kproc_desc idlepoll_kp = { |
nothing calls this directly
no test coverage detected