[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HRT_FROM_8254() bug





On Thu, 10 May 2001, frank mori hess wrote:

>
> Hello,
>
> I am using rtlinux-3.0, kernel2.2.18 on an i386 (amd k6-2) and I have
> noticed that HRT_FROM_8254() bugs if you give it an argument greater than
> 0x7FFFFFFF.  This is causing crashes (division errors) when I call the
> compatibility function rt_task_make_periodic(), which calls
> HRT_FROM_8254() to convert from RTIME to hrtime_t to translate arguments
> into the newer api.

Ok, after closer inspection it seems the bug happens when I call
HRT_TO_8254() and the return value is greater than 0x7fffffff, which makes
more sense since it was a division error and HRT_TO_8254 is the one that
is supposed to divide a long long by 838.  It was causing me problems when
I called rt_get_time() after having an uptime of more than a half-hour
(which corresponds to an RTIME of 0x7fffffff)

Frank