[lkml]   [2006]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] timers, pointers to functions and type safety
On Sun, Dec 03, 2006 at 11:21:09AM +0100, Pavel Machek wrote:
> Hi!
> > > > The other alternative has real _practical_ value in almost every case,
> > > > which I very much prefer. What's wrong with that?
> > >
> > > Lack of any type safety whatsoever, magic boilerplates in callback instances,
> > > rules more complex than "your callback should take a pointer, don't cast
> > > anything, it's just a way to arrange for a delayed call, nothing magical
> > > needed"?
> >
> > I admit the compile check in SETUP_TIMER() is clever, but this way all the
> > magic is in this place and is it really worth it? You're only adding _one_
> > extra typecheck for mostly simple cases anyway.
> Well, there are so many of these simple changes, that SETUP_TIMER()
> with its clever trick looks very useful.

I agree with Al, Matthew and Pavel. The current timer stuff is a pita
and needs fixing, and it seems Al has come up with a good way to do it
without adding additional crap into every single user of timers.

There *are* times when having the additional space for storing a pointer
is cheaper (in terms of number of bytes) than code to calculate an offset,
and those who have read the assembly code probably know this all too well.

Al - I look forward to your changes.

Russell King
Linux kernel 2.6 ARM Linux -
maintainer of:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-12-03 12:29    [W:0.084 / U:7.528 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site