Re: [RFC] timers, pointers to functions and type safety

2006-12-02 Thread Al Viro
On Sat, Dec 02, 2006 at 04:23:32AM -0500, Kyle Moffett wrote: > On Dec 01, 2006, at 12:21:49, Al Viro wrote: > >And that's where it gets interesting. It would be very nice to get to > >the following situation: > > * callbacks are void (*)(void *) > > * data is void

Re: [RFC] timers, pointers to functions and type safety

2006-12-02 Thread Al Viro
On Sat, Dec 02, 2006 at 01:29:32AM -0500, Daniel Berlin wrote: > >While that is safe (modulo the portability constraint that affects much > >more code than just timers), it ends up very inconvenient and leads to > >lousy type safety. > > Understandable. I assume you are trying to get more type s

[RFC] timers, pointers to functions and type safety

2006-12-01 Thread Al Viro
There's a bunch of related issues, some kernel, some gcc, thus the Cc from hell on that one. First of all, in theory the timers in kernel are done that way: * they have callback of type void (*)(unsigned long) * they have data to be passed to it - of type unsigned long