Thread (16 messages) 16 messages, 4 authors, 2008-11-21

Re: times(2) sys call bug?

From: Joakim Tjernlund <hidden>
Date: 2008-11-21 10:07:39

On Fri, 2008-11-21 at 20:51 +1100, Paul Mackerras wrote:
Joakim Tjernlund writes:
quoted
quoted
+	force_successful_syscall_return();
 	return (long) jiffies_64_to_clock_t(get_jiffies_64());
Why is 64 bits ops used here when you only use 32 bits? 
If HZ is 1000, jiffies_64_to_clock_t is going to divide jiffies by 10,
so we need to start with 64 bits in order to get the top few bits
of a 32-bit result correct.
I see, thanks.
quoted
BTW, I think time(2) needs this:
In principle you are correct, but it's only going to matter for a
little over an hour some time in the year 2106. :)
I know, but I figured it should be fixed to serve as an template for
other similar sys calls(not that I know of any offhand). Perhaps add it
commented?

 Jocke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help