Messages in this thread | | | Date | Tue, 3 May 2005 11:07:25 -0700 | From | Nish Aravamudan <> | Subject | Re: [RFC][PATCH] new timeofday-based soft-timer subsystem |
| |
On 5/3/05, Chris Friesen <cfriesen@nortel.com> wrote: > Nishanth Aravamudan wrote: > > > but then there is another issue: the restart_block used by > > sys_nanosleep() only allows for 4 unsigned long arguments, when, in > > fact, nanoseconds are a 64-bit quantity in the kernel. As long as the > > nanosleep() request is no more than around 4 seconds, we should be ok > > using unsigned longs. > > My man page for nanosleep specifies that the "nanoseconds" portion of > the timespec must be under 1 billion and is of type "long". Is that no > longer valid?
Certainly would be, but the problem is if you pass in a timespec ts, where
ts.tv_sec = 10; ts.tv_nsec = 99999;
This will overflow a 32-bit nanosecond representation internally (10000099999 > 4294967296). Sorry for the confusion, the unsigned long I was referring to was the internal representation of the nanoseconds converted from the timespec parameter.
Thanks, Nish - 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/
| |