diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-06-26 17:19:40 -0400 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-06-26 17:19:40 -0400 |
| commit | 2a322e4c08be4e7cb0c04b427ddaaa679fd88863 (patch) | |
| tree | ad8cc17bfd3b5e57e36f07a249028667d72f0b96 /arch/um/kernel/time.c | |
| parent | ba6d2377c85c9b8a793f455d8c9b6cf31985d70f (diff) | |
| parent | 8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff) | |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'arch/um/kernel/time.c')
| -rw-r--r-- | arch/um/kernel/time.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index c40c86a3f918..f829b309b63c 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
| @@ -33,7 +33,7 @@ void timer(void) | |||
| 33 | timeradd(&xtime, &local_offset, &xtime); | 33 | timeradd(&xtime, &local_offset, &xtime); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | void set_interval(int timer_type) | 36 | static void set_interval(int timer_type) |
| 37 | { | 37 | { |
| 38 | int usec = 1000000/hz(); | 38 | int usec = 1000000/hz(); |
| 39 | struct itimerval interval = ((struct itimerval) { { 0, usec }, | 39 | struct itimerval interval = ((struct itimerval) { { 0, usec }, |
| @@ -45,12 +45,7 @@ void set_interval(int timer_type) | |||
| 45 | 45 | ||
| 46 | void enable_timer(void) | 46 | void enable_timer(void) |
| 47 | { | 47 | { |
| 48 | int usec = 1000000/hz(); | 48 | set_interval(ITIMER_VIRTUAL); |
| 49 | struct itimerval enable = ((struct itimerval) { { 0, usec }, | ||
| 50 | { 0, usec }}); | ||
| 51 | if(setitimer(ITIMER_VIRTUAL, &enable, NULL)) | ||
| 52 | printk("enable_timer - setitimer failed, errno = %d\n", | ||
| 53 | errno); | ||
| 54 | } | 49 | } |
| 55 | 50 | ||
| 56 | void disable_timer(void) | 51 | void disable_timer(void) |
| @@ -155,13 +150,15 @@ void idle_sleep(int secs) | |||
| 155 | nanosleep(&ts, NULL); | 150 | nanosleep(&ts, NULL); |
| 156 | } | 151 | } |
| 157 | 152 | ||
| 158 | /* | 153 | /* XXX This partly duplicates init_irq_signals */ |
| 159 | * Overrides for Emacs so that we follow Linus's tabbing style. | 154 | |
| 160 | * Emacs will notice this stuff at the end of the file and automatically | 155 | void user_time_init(void) |
| 161 | * adjust the settings for this buffer only. This must remain at the end | 156 | { |
| 162 | * of the file. | 157 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, |
| 163 | * --------------------------------------------------------------------------- | 158 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, |
| 164 | * Local variables: | 159 | SIGALRM, SIGUSR2, -1); |
| 165 | * c-file-style: "linux" | 160 | set_handler(SIGALRM, (__sighandler_t) alarm_handler, |
| 166 | * End: | 161 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, |
| 167 | */ | 162 | SIGVTALRM, SIGUSR2, -1); |
| 163 | set_interval(ITIMER_VIRTUAL); | ||
| 164 | } | ||
