diff options
Diffstat (limited to 'arch/um/os-Linux/time.c')
-rw-r--r-- | arch/um/os-Linux/time.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index 280c4fb9b585..4ae73c0e5485 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c | |||
@@ -17,11 +17,6 @@ | |||
17 | #include "kern_constants.h" | 17 | #include "kern_constants.h" |
18 | #include "os.h" | 18 | #include "os.h" |
19 | 19 | ||
20 | /* XXX This really needs to be declared and initialized in a kernel file since | ||
21 | * it's in <linux/time.h> | ||
22 | */ | ||
23 | extern struct timespec wall_to_monotonic; | ||
24 | |||
25 | static void set_interval(int timer_type) | 20 | static void set_interval(int timer_type) |
26 | { | 21 | { |
27 | int usec = 1000000/hz(); | 22 | int usec = 1000000/hz(); |
@@ -71,6 +66,7 @@ void switch_timers(int to_real) | |||
71 | errno); | 66 | errno); |
72 | } | 67 | } |
73 | 68 | ||
69 | #ifdef UML_CONFIG_MODE_TT | ||
74 | void uml_idle_timer(void) | 70 | void uml_idle_timer(void) |
75 | { | 71 | { |
76 | if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR) | 72 | if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR) |
@@ -80,14 +76,7 @@ void uml_idle_timer(void) | |||
80 | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1); | 76 | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1); |
81 | set_interval(ITIMER_REAL); | 77 | set_interval(ITIMER_REAL); |
82 | } | 78 | } |
83 | 79 | #endif | |
84 | void time_init(void) | ||
85 | { | ||
86 | if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) | ||
87 | panic("Couldn't set SIGVTALRM handler"); | ||
88 | set_interval(ITIMER_VIRTUAL); | ||
89 | time_init_kern(); | ||
90 | } | ||
91 | 80 | ||
92 | unsigned long long os_nsecs(void) | 81 | unsigned long long os_nsecs(void) |
93 | { | 82 | { |
@@ -106,15 +95,7 @@ void idle_sleep(int secs) | |||
106 | nanosleep(&ts, NULL); | 95 | nanosleep(&ts, NULL); |
107 | } | 96 | } |
108 | 97 | ||
109 | /* XXX This partly duplicates init_irq_signals */ | ||
110 | |||
111 | void user_time_init(void) | 98 | void user_time_init(void) |
112 | { | 99 | { |
113 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, | ||
114 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, | ||
115 | SIGALRM, SIGUSR2, -1); | ||
116 | set_handler(SIGALRM, (__sighandler_t) alarm_handler, | ||
117 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, | ||
118 | SIGVTALRM, SIGUSR2, -1); | ||
119 | set_interval(ITIMER_VIRTUAL); | 100 | set_interval(ITIMER_VIRTUAL); |
120 | } | 101 | } |