UML - tidy set_interval
PATCH 3/11 UML - tidy set_interval
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 <[email protected]>
--
arch/um/include/os.h | 2 +- arch/um/kernel/time.c | 2 +- arch/um/os-Linux/skas/process.c | 2 +- arch/um/os-Linux/time.c | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-)
arch/um/include/os.h +1 -1
@@ -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 );
arch/um/kernel/time.c +1 -1
@@ -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);
arch/um/os-Linux/skas/process.c +1 -1
@@ -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);
arch/um/os-Linux/time.c +2 -3
@@ -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 ;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel