[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] 10 msec number of ticks bug..
Hi Prasad,
DeviPrasad Natesan wrote:
> I rechecked the microblaze timer document, it does say it correctly
> (matches whatever i calculated). So the code should have been
>
> count = ((unsigned)-1) - CONFIG_XILINX_CPU_CLOCK_FREQ / rate + 2;
Committed to CVS.
> Also, please correct the following in the do_settimeofday() in the
> time.c. The "#if 0" should be removed. Otherwise, it wouldn't count
> the elapsed ticks whenever settimeofday() called potentially leading
> to the fixed offset.
>
> #if 0
> tv->tv_usec -= mach_gettimeoffset ();
> #endif
Also applied (in a slightly different form):
-#if 0
- tv->tv_usec -= mach_gettimeoffset ();
-#endif
+ tv->tv_usec -= mach_gettimeoffset ? mach_gettimeoffset () : 0;
The offset must be conditional on the existence of the mach_gettimeoffset
symbol, which might not be defined on some platforms.
Thanks,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/