diff options
Diffstat (limited to 'Documentation/timers')
| -rw-r--r-- | Documentation/timers/hpet_example.c | 27 | ||||
| -rw-r--r-- | Documentation/timers/timer_stats.txt | 2 | ||||
| -rw-r--r-- | Documentation/timers/timers-howto.txt | 2 |
3 files changed, 29 insertions, 2 deletions
diff --git a/Documentation/timers/hpet_example.c b/Documentation/timers/hpet_example.c index 4bfafb7bc4c5..9a3e7012c190 100644 --- a/Documentation/timers/hpet_example.c +++ b/Documentation/timers/hpet_example.c | |||
| @@ -97,6 +97,33 @@ hpet_open_close(int argc, const char **argv) | |||
| 97 | void | 97 | void |
| 98 | hpet_info(int argc, const char **argv) | 98 | hpet_info(int argc, const char **argv) |
| 99 | { | 99 | { |
| 100 | struct hpet_info info; | ||
| 101 | int fd; | ||
| 102 | |||
| 103 | if (argc != 1) { | ||
| 104 | fprintf(stderr, "hpet_info: device-name\n"); | ||
| 105 | return; | ||
| 106 | } | ||
| 107 | |||
| 108 | fd = open(argv[0], O_RDONLY); | ||
| 109 | if (fd < 0) { | ||
| 110 | fprintf(stderr, "hpet_info: open of %s failed\n", argv[0]); | ||
| 111 | return; | ||
| 112 | } | ||
| 113 | |||
| 114 | if (ioctl(fd, HPET_INFO, &info) < 0) { | ||
| 115 | fprintf(stderr, "hpet_info: failed to get info\n"); | ||
| 116 | goto out; | ||
| 117 | } | ||
| 118 | |||
| 119 | fprintf(stderr, "hpet_info: hi_irqfreq 0x%lx hi_flags 0x%lx ", | ||
| 120 | info.hi_ireqfreq, info.hi_flags); | ||
| 121 | fprintf(stderr, "hi_hpet %d hi_timer %d\n", | ||
| 122 | info.hi_hpet, info.hi_timer); | ||
| 123 | |||
| 124 | out: | ||
| 125 | close(fd); | ||
| 126 | return; | ||
| 100 | } | 127 | } |
| 101 | 128 | ||
| 102 | void | 129 | void |
diff --git a/Documentation/timers/timer_stats.txt b/Documentation/timers/timer_stats.txt index 9bd00fc2e823..8abd40b22b7f 100644 --- a/Documentation/timers/timer_stats.txt +++ b/Documentation/timers/timer_stats.txt | |||
| @@ -19,7 +19,7 @@ Linux system over a sample period: | |||
| 19 | 19 | ||
| 20 | - the pid of the task(process) which initialized the timer | 20 | - the pid of the task(process) which initialized the timer |
| 21 | - the name of the process which initialized the timer | 21 | - the name of the process which initialized the timer |
| 22 | - the function where the timer was intialized | 22 | - the function where the timer was initialized |
| 23 | - the callback function which is associated to the timer | 23 | - the callback function which is associated to the timer |
| 24 | - the number of events (callbacks) | 24 | - the number of events (callbacks) |
| 25 | 25 | ||
diff --git a/Documentation/timers/timers-howto.txt b/Documentation/timers/timers-howto.txt index c9ef29d2ede3..038f8c77a076 100644 --- a/Documentation/timers/timers-howto.txt +++ b/Documentation/timers/timers-howto.txt | |||
| @@ -24,7 +24,7 @@ ATOMIC CONTEXT: | |||
| 24 | 24 | ||
| 25 | ndelay(unsigned long nsecs) | 25 | ndelay(unsigned long nsecs) |
| 26 | udelay(unsigned long usecs) | 26 | udelay(unsigned long usecs) |
| 27 | mdelay(unsgined long msecs) | 27 | mdelay(unsigned long msecs) |
| 28 | 28 | ||
| 29 | udelay is the generally preferred API; ndelay-level | 29 | udelay is the generally preferred API; ndelay-level |
| 30 | precision may not actually exist on many non-PC devices. | 30 | precision may not actually exist on many non-PC devices. |
