diff options
author | gallatin <gallatin@FreeBSD.org> | 2001-03-23 19:22:21 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2001-03-23 19:22:21 +0000 |
commit | 24f4ef1037aa23b2770d1de861eba2f074aac54a (patch) | |
tree | 39af270dc9ee712ba2f2e107e6817284d9576984 /sys/compat/linux/linux_misc.c | |
parent | aabe84d0cbca8d7eed5bd5b81cb33f80bca39a55 (diff) | |
download | FreeBSD-src-24f4ef1037aa23b2770d1de861eba2f074aac54a.zip FreeBSD-src-24f4ef1037aa23b2770d1de861eba2f074aac54a.tar.gz |
fix linux_times() to take into account linux's value of CLK_TCK on the alpha.
Previously, results were off by a factor of 10
Tested by: Yoriaki FUJIMORI <fujimori@grafin.fujimori.cache.waseda.ac.jp>
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 3e08d85..790e679 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -640,7 +640,12 @@ struct linux_times_argv { long tms_cstime; }; +#ifdef __alpha__ +#define CLK_TCK 1024 /* Linux uses 1024 on alpha */ +#else #define CLK_TCK 100 /* Linux uses 100 */ +#endif + #define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK)) int |