diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 12de1ea683705e2c26131552569380815a2a728b..1897785fd5710392ef45285100805bde3be283ec 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -252,7 +252,7 @@ extern void os_dump_core(void); extern int switch_timers(int to_real); extern void idle_sleep(int secs); -extern int set_interval(int is_virtual); +extern int set_interval(void); extern void disable_timer(void); extern void uml_idle_timer(void); extern unsigned long long os_nsecs(void); diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 633b673d57781ee82a1afa7c4b26898c37f76c7d..2bda07dcd34513022a5892b98b34be8d46cf391b 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -102,7 +102,7 @@ static void register_timer(void) printk(KERN_ERR "register_timer : request_irq failed - " "errno = %d\n", -err); - err = set_interval(1); + err = set_interval(); if (err != 0) printk(KERN_ERR "register_timer : set_interval failed - " "errno = %d\n", -err); diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 5462469f4ebf37035dec9861e6e8b93fb5553732..0036164bb0fb48e1b99d0f2827865ff8f33c97fc 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -178,7 +178,7 @@ static int userspace_tramp(void *stack) ptrace(PTRACE_TRACEME, 0, 0, 0); init_new_thread_signals(); - err = set_interval(1); + err = set_interval(); if (err) panic("userspace_tramp - setting timer failed, errno = %d\n", err); diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index a16a0f484edc8f3fa517c7e2d8a479ef6f2624c3..b156f03e1713421d22fbd8bedaedd60641d51305 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -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;