Re: how to pass a private data struct to TASKLET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mandeep sandhu wrote:
hi list,

i have a small problem. i need to pass a private data structure to a tasklet,how should i do
it. In DECLARE_TASKLET there's an argument for "data", which is passed to my tasklet fxn.
but this does'nt seem to be helpfull cos my private data structure is part of another struct
which is itself initalized at runtime and hence i don't have a handle to it before-hand.


TIA
-/dev/mandeep

_________________________________________________________________
Marriage? http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Join BharatMatrimony.com for free.



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


the type of data is void ** so u can pass any structure. But in the tasklet function, the defintion of the structure must be known. Maybe u hav to include the header file in the function which runs the tasklet but it's a bad idea :)
U shouldn't use ur own structure for tasklet. Or try to access the different fields of the structure just with adresses. This will be tedious :)



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux