From 24f4ef1037aa23b2770d1de861eba2f074aac54a Mon Sep 17 00:00:00 2001 From: gallatin Date: Fri, 23 Mar 2001 19:22:21 +0000 Subject: 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 --- sys/compat/linux/linux_misc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/compat/linux/linux_misc.c') 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 -- cgit v1.1