下面是一个使用hrtimer_active函数的示例代码: #include<linux/hrtimer.h>staticstructhrtimermy_timer;enumhrtimer_restartmy_timer_callback(structhrtimer*timer){// 定时器回调函数的实现returnHRTIMER_RESTART;}intinit_module(void){// 初始化定时器hrtimer_init(&my_timer,CLOCK_MONOTONIC,HRTIMER_MODE_REL);my_...
*/staticintrow_dispatch_requests(struct request_queue *q,intforce){structrow_data*rd= (structrow_data*)q->elevator->elevator_data;intret =0, currq, ioprio_class_to_serve, start_idx, end_idx;intexpire_index =-1;if(force &&hrtimer_active(&rd->rd_idle_data.hr_timer)) {if(hrtimer_tr...
*/staticintrow_dispatch_requests(struct request_queue *q,intforce){structrow_data*rd= (structrow_data*)q->elevator->elevator_data;intret =0, currq, ioprio_class_to_serve, start_idx, end_idx;intexpire_index =-1;if(force &&hrtimer_active(&rd->rd_idle_data.hr_timer)) {if(hrtimer_tr...
*/voidhrtimer_run_queues(void){structtimerqueue_node*node;structhrtimer_cpu_base*cpu_base= &__get_cpu_var(hrtimer_bases);structhrtimer_clock_base*base;intindex, gettime =1;if(hrtimer_hres_active())return;for(index =0; index < HRTIMER_MAX_CLOCK_BASES; index++) { base = &cpu_base->c...