Re: settimeofday function taking 24 - 30 minutes to complete

From: Scot Hetzel <swhetzel_at_gmail.com>
Date: Sat, 23 Dec 2006 01:40:14 -0600
On 12/23/06, Scot Hetzel <swhetzel_at_gmail.com> wrote:
> By making the following change, the test program no longer hangs the system:
>
>        /*
>         * Calculate local time to put in RTC
>         * Ignore UTC offset, if it would cause the time < Jan 1, 1970 00:00.
>         */
>        if (tm >= utc_offset())
>                tm -= utc_offset();
>        else
>                printf("resettodr: utc_offset > tm");
>
> We probably need to change all the locations that use utc_offset(), to
> have a similar "if (x >= utc_offset()) x -= utc_offset();".
>
Attached is a patch that fixes most of the x -= utc_offset(); cases in
the kernel.

The only one that's not fixed is in sys/dev/twa/tw_osl_inline.h.

Scot

-- 
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.

Received on Sat Dec 23 2006 - 06:40:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC