How to set work_struct data
haojian.zhuang at gmail.com
Thu Apr 21 07:26:27 EDT 2011
On Thu, Apr 21, 2011 at 6:22 PM, Pankaj B <xpankajbx at gmail.com> wrote:
> Current INIT_WORK() macro takes just work_struct pointer and function
> In previous kernels there used to be a third parameter for data.
> Is there a proper way to set data in work_struct?
Embed the work_struct into your structure. Then use container_of() to get the
structure in work function. So you can add anything into your structure.
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
More information about the Kernelnewbies