On Wed, 2012-09-19 at 14:30 -0700, Adrian Chadd wrote:
> On 19 September 2012 14:12, Ian Lepore <free...@damnhippie.dyndns.org> wrote:
> 
> >> Right. Being totally clueless, is atrc_start() called just at
> >> probe/attach, or during normal operation?
> >>
> >
> > It's called just once, from the attach() routine for the rtc device.
> 
> Right. Just have it loop over say 100 times, with a 10us sleep between
> each. Shouldn't that be enough?
> 

If by "sleep" you mean any form of pausing or sleeping that waits for a
given amount of time... remember when this code is running we're still
in the process of trying to figure out which clocks can be used for such
purposes.  That leaves DELAY(), which does pretty much the equivelent of
what the loop in question is doing.  Hmmm, but DELAY() does have the
advantage of busy-looping for a known amount of time, making it easier
to constrain the time spent in the loop regardless of the speed of the
cpu.  I'll have to look into how DELAY() is implemented for x86 and see
if it's usable in this context.

-- Ian


_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to