uml: simplify interval setting
set_interval took a timer type as an argument, but it always specified a virtual timer. So, it is not needed, and it is gone, and set_interval is simplified appropriately. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
181bde801a
commit
a2f018bf38
@ -14,14 +14,13 @@
|
||||
|
||||
static int is_real_timer = 0;
|
||||
|
||||
int set_interval(int is_virtual)
|
||||
int set_interval(void)
|
||||
{
|
||||
int usec = 1000000/UM_HZ;
|
||||
int timer_type = is_virtual ? ITIMER_VIRTUAL : ITIMER_REAL;
|
||||
struct itimerval interval = ((struct itimerval) { { 0, usec },
|
||||
{ 0, usec } });
|
||||
|
||||
if (setitimer(timer_type, &interval, NULL) == -1)
|
||||
if (setitimer(ITIMER_VIRTUAL, &interval, NULL) == -1)
|
||||
return -errno;
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user