* Switch to active mode (skip empty ticks). */
| 791 | * Switch to active mode (skip empty ticks). |
| 792 | */ |
| 793 | void |
| 794 | cpu_activeclock(void) |
| 795 | { |
| 796 | sbintime_t now; |
| 797 | struct pcpu_state *state; |
| 798 | struct thread *td; |
| 799 | |
| 800 | state = DPCPU_PTR(timerstate); |
| 801 | if (state->idle == 0 || busy) |
| 802 | return; |
| 803 | if (periodic) |
| 804 | now = state->now; |
| 805 | else |
| 806 | now = sbinuptime(); |
| 807 | CTR3(KTR_SPARE2, "active at %d: now %d.%08x", |
| 808 | curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff)); |
| 809 | spinlock_enter(); |
| 810 | td = curthread; |
| 811 | td->td_intr_nesting_level++; |
| 812 | handleevents(now, 1); |
| 813 | td->td_intr_nesting_level--; |
| 814 | spinlock_exit(); |
| 815 | } |
| 816 | |
| 817 | /* |
| 818 | * Change the frequency of the given timer. This changes et->et_frequency and |
no test coverage detected