Linux 内核时钟之oneshot建立

oneshot是内核对周期性timer增强。CONFIG_TICK_ONESHOT
 
 
 * tick_setup_oneshot - setup the event device for oneshot mode (hres or nohz)
 */
void tick_setup_oneshot(struct clock_event_device *newdev,
   void (*handler)(struct clock_event_device *),
   ktime_t next_event)
{
 newdev->event_handler = handler;
 clockevents_switch_state(newdev, CLOCK_EVT_STATE_ONESHOT);
 clockevents_program_event(newdev, next_event, true);
}
 
 

你可能感兴趣的:(Linux,Kernel)