Problem of workqueue
From: rohan puri <hidden>
Date: 2012-05-04 03:28:14
On Fri, May 4, 2012 at 6:55 AM, ??? [off-list ref] wrote:
Hi Chetan, Thanks for reply and it works. And I want to verify some other things. Is it a good way to use workqueue to do this job: send data to user space through netlink socket from kernel? Thanks! 2012/5/4 Chetan Nanda [off-list ref]:quoted
On May 3, 2012 8:37 PM, "???" [off-list ref] wrote:quoted
Hi, I want to use workqueue in my irq handler. Some materials say that I can use INIT_WORK( &work, function, &data ); to initialize work, whose type is struct work_struct, and data is something should be passed to function. however, it seems that now the macro INIT_WORK() only accept two parameters:&work and function. My problem is how to pass data to the function and why they change that macro? Thanks!May be you are looking for something like this:http://www.linuxforums.org/forum/kernel/183688-init_work-two-arguments.htmlquoted
~chetan _______________________________________________quoted
Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies_______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, To send data from kernel space and user-space see kernel's notification mechanism like fanotify which works on by creating an anonymous fd in the user-space process's context which then might perform normal read() and write() call to receive and send data to kernel. - Rohan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120504/4c91d0cc/attachment.html