Subject: Getting the time during autoconf (was Re: RFC: vesafb, splash
To: Jason Thorpe <thorpej@shagadelic.org>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: tech-kern
Date: 02/15/2006 04:14:02
On Tue, 2006-02-14 at 09:46 -0800, Jason Thorpe wrote:
> 5 grey dots
> 
>            o o o o o
> 
> ...that darken as aprint*() steps occur:
> 
>            * o o o o
> 
>            o * o o o
> 
>            o o * o o
> 
>            o o o * o
> 
>            o o o o *
> 
>            * o o o o
> 
> ...and so on.

So, I went ahead and did this. There's a problem though: It looks very
chunky if I rely on aprint* or twiddle(). I need a way to throttle the
dots so it doesn't jump 3 spaces every now and then.

My original thought was to use callout_schedule, and then register a
callback with config_finalize_register that called callout_stop. Oops,
callout uses soft interrupts, so that won't work.

Next thought was to start a kthread, that updated the animation and
called tsleep for a length of time. Again, no good. At one point I had a
bug where I wasn't returning 0 from the config_finalize_register
callback and got stuck continuously updating the animation, and this
looked very nice.

I ended up moving the call to splash_progress_update() to
kern/subr_prf.c:twiddle(), but I need a way to throttle it. Since
interrupts are disabled, is there any way in hell I can slow down my
updates?

Cheers,
Jared