diff options
Diffstat (limited to 'arch/um/kernel/time.c')
-rw-r--r-- | arch/um/kernel/time.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index f829b309b63c..c40b611e3d93 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -48,6 +48,13 @@ void enable_timer(void) | |||
48 | set_interval(ITIMER_VIRTUAL); | 48 | set_interval(ITIMER_VIRTUAL); |
49 | } | 49 | } |
50 | 50 | ||
51 | void prepare_timer(void * ptr) | ||
52 | { | ||
53 | int usec = 1000000/hz(); | ||
54 | *(struct itimerval *)ptr = ((struct itimerval) { { 0, usec }, | ||
55 | { 0, usec }}); | ||
56 | } | ||
57 | |||
51 | void disable_timer(void) | 58 | void disable_timer(void) |
52 | { | 59 | { |
53 | struct itimerval disable = ((struct itimerval) { { 0, 0 }, { 0, 0 }}); | 60 | struct itimerval disable = ((struct itimerval) { { 0, 0 }, { 0, 0 }}); |