Rusty Russell wrote:I wasn't too convinced with only irq handler conversion but with other things converted, I'm liking it very much. I really like the timer conversion as casting between void * and unsigned long is annoying. Possible improvements. * Passing NULL as data to callback which takes non-void pointer triggers warning. I think this should be allowed. Something like the following? * Allowing non-pointer integral types which fit into pointer would be nice. It's often convenient to pass integers to simple callbacks. The following macro kinda-sorta achieves the above two but it doesn't consider promotion of integer types and thus is too strict. There gotta be some way. #define kthread_create(threadfn, data, namefmt...) ({ \ int (*_threadfn)(typeof(data)); \ void *_data; \ _threadfn = __builtin_choose_expr(!__builtin_types_compatible_p(typeof(data), typeof(NULL)), \ (threadfn), (void *)(threadfn)); \ _data = __builtin_choose_expr(sizeof(data) <= sizeof(void *), \ (void *)(unsigned long)data, (void *)data); \ __kthread_create((void *)_threadfn, _data, namefmt); \ }) Thanks. -- tejun --
| 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 |
