On Monday 21 January 2008 00:00:52 Tejun Heo wrote:For everything but timer, you'll get a warning if the data isn't assignable to a void *, so you get a warning if you use a non-pointer already. But it would be cool to allow functions which take an unsigned long. To do this, I think that would need to be a special case for the data arg (which we'd really want to wrap in a macro), like: /* If fn expects an unsigned long, cast the data. If not, we'll * get a warning if data is not void * compatible. */ __builtin_choose_expr(__builtin_compatible_p(typeof(1?(threadfn):NULL), int (*)(unsigned long)), (void *)(unsigned long)(data), (data)) Hmm, u64 on 32-bit platforms? I think that will fail the above test: the type of the function ptr will be "int (*)(u64)" and so you'll end up passing data (a u64) to a void * argument, which will elicit a warning... I'll test this out and see what I can make... Thanks! Rusty. --
| H. Peter Anvin | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
| Linus Torvalds | Linux 2.6.27-rc5 |
| Ingo Molnar | [announce] "kill the Big Kernel Lock (BKL)" tree |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Ben Hutchings | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH iproute2] Re: HTB accuracy for high speed |
