• Jeff Dike's avatar
    uml: eliminate interrupts in the idle loop · b160fb63
    Jeff Dike authored
    Now, the idle loop now longer needs SIGALRM firing - it can just sleep for the
    requisite amount of time and fake a timer interrupt when it finishes.
    
    Any use of ITIMER_REAL now goes away.  disable_timer only turns off
    ITIMER_VIRTUAL.  switch_timers is no longer needed, so it, and all calls, goes
    away.
    
    disable_timer now returns the amount of time remaining on the timer.
    default_idle uses this to tell idle_sleep how long to sleep.  idle_sleep will
    call alarm_handler if nanosleep returns 0, which is the case if it didn't
    return early due to an interrupt.  Otherwise, it just returns.
    Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b160fb63
os.h 10.5 KB