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 --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| David Miller | Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers. |
git: | |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
