列表 3. 新的 sched-yield 代码

asmlinkage int sys_sched_yield(void) {
 cli();
move_last_runqueue(current);
if (current->counter) // CHANGE IS HERE
 current->counter--;
 need_resched = 1;
 sti();
 return 0;
 }
© . All rights reserved.