Re: [RFC 1/2] Add clock_gettime_ns syscall
From: Richard Cochran
Date: Mon Dec 12 2011 - 22:32:43 EST
On Mon, Dec 12, 2011 at 05:26:37PM -0800, Andy Lutomirski wrote:
> On some architectures, clock_gettime is fast enough that converting
> between nanoseconds and struct timespec takes a significant amount of
> time. Introduce a new syscall that does the same thing but returns the
> answer in nanoseconds. 2^64 nanoseconds since the epoch won't wrap
> around until the year 2554, and by then we can use 128-bit types.
You have here unsigned, but the time_t timespec is signed. To be
consistent which clock_gettime, it would have to be signed, and that
still gives you about 300 years.
OTOH, clearly new and different syscalls can happily be unsigned.
In any case, you should make it clear.
Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/