aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r--arch/um/os-Linux/skas/process.c2
-rw-r--r--arch/um/os-Linux/time.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 5462469f4eb..0036164bb0f 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)
178 ptrace(PTRACE_TRACEME, 0, 0, 0); 178 ptrace(PTRACE_TRACEME, 0, 0, 0);
179 179
180 init_new_thread_signals(); 180 init_new_thread_signals();
181 err = set_interval(1); 181 err = set_interval();
182 if (err) 182 if (err)
183 panic("userspace_tramp - setting timer failed, errno = %d\n", 183 panic("userspace_tramp - setting timer failed, errno = %d\n",
184 err); 184 err);
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index a16a0f484ed..b156f03e171 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -14,14 +14,13 @@
14 14
15static int is_real_timer = 0; 15static int is_real_timer = 0;
16 16
17int set_interval(int is_virtual) 17int set_interval(void)
18{ 18{
19 int usec = 1000000/UM_HZ; 19 int usec = 1000000/UM_HZ;
20 int timer_type = is_virtual ? ITIMER_VIRTUAL : ITIMER_REAL;
21 struct itimerval interval = ((struct itimerval) { { 0, usec }, 20 struct itimerval interval = ((struct itimerval) { { 0, usec },
22 { 0, usec } }); 21 { 0, usec } });
23 22
24 if (setitimer(timer_type, &interval, NULL) == -1) 23 if (setitimer(ITIMER_VIRTUAL, &interval, NULL) == -1)
25 return -errno; 24 return -errno;
26 25
27 return 0; 26 return 0;