Re: [PATCH] Some clean up of the time code.

From: george anzinger (
Date: Tue Jun 10 2003 - 10:36:38 EST

Andrew Morton wrote:
> george anzinger <> wrote:
>>-void do_settimeofday(struct timeval *tv)
>> +int do_settimeofday(struct timespec *tv)
>> {
>> + if ((unsigned long)tv->tv_nsec > NSEC_PER_SEC)
>> + return -EINVAL;
>> +
> Should that be ">="?
> Is there any reasonable way to avoid breaking existing
> do_settimeofday() implementations? That's just more grief all round.

Hm. Giving this more thought, the main reason for the change was to
move to the timespec from the timeval, i.e. nanoseconds instead of
microseconds. The error check was put in because the function was
already being changed. The reason to move to the timespec is to
complete the change made to xtime and to more correctly align with the
POSIX clock_settime, both of which use timespec.

I suspect Linus would prefer this direction...


George Anzinger
Preemption patch:

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:24 EST