lkml.org 
[lkml]   [2003]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] elapsed times wrap
Userspace shows huge elapsed time across jiffies wrap: with USER_HZ
less then HZ, sys_times needs jiffies_64 to calculate its retval.

--- 2.5.62/kernel/sys.c Sat Feb 15 08:30:12 2003
+++ linux/kernel/sys.c Fri Feb 21 20:41:52 2003
@@ -870,7 +870,7 @@
if (copy_to_user(tbuf, &tmp, sizeof(struct tms)))
return -EFAULT;
}
- return jiffies_to_clock_t(jiffies);
+ return (long) jiffies_64_to_clock_t(get_jiffies_64());
}

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.040 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site