[haiku-gsoc] Re: New timer patch (again) (Was: Re: First timer.diff (from private e-mails))

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Fri, 04 Jul 2008 15:30:41 +0200 CEST

"Dustin Howett" <alaricx@xxxxxxxxx> wrote:
> Revision 9: ChangeLog
>  - sBestTimer -> sTimer, currentPriority -> bestPriority,
> timerPriority -> priority
>  - Panic when a timer can't be used.
>    - As a consequence of this, I removed the "if (sTimer != NULL)"
> checks from set/clear hardware timer, because we'll never get that 
> far
> without sTimer.
>  - Move apic's special init into its own function for arch_smp.c to
> call. Keep init around for the timer crawling code to not reject it
> and not have to write a special case into the loop.
>  - Fix most () != (void) issues, except for interrupt handlers,
> because install_io_interrupt_handler and the like don't like (void)
> methods.

If you mean:
> +static int32
> +apic_timer_interrupt()

This is not surprising, as the interrupt function signature is int32 
handler(void *data) - while () is allowed as a substitute (because 
(...) implies that, too), (void) is not, obviously. You should add the 
(void *data) part, though.
BTW is there any reason to have sPriority in the timers a static but 
not const? If you ask me, you could just return "1" or whatever 
suitable from the get_priority() function directly.

Thanks again! :-)
Since I'm almost away now, I let Stefano apply the patch. I'm looking 
forward to your HPET work!

Bye,
   Axel.


Other related posts: