LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-17-2011, 10:08 AM   #1
pullmandave
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
Convert INIT_WORK to INIT_DELAYED_WORK with argument


Hello:

I'm converting some device drivers from CentOS 5.x (2.6.18) to CentOS 6.0 (2.6.32) and the INIT_WORK macros have gone away. I've got to pass an argument to the worker and no where (Google, etc) have I seen how to do this with the INIT_DELAYED_WORK, the recommended replacement. Is there a field in the delayed_work structure that I could use to achieve this passing of the argument?

Thanks in advance
 
Old 10-18-2011, 12:17 AM   #2
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
INIT_WORK and INIT_WORK_DELAYED both do exist but you can not pass an argument to them during the call.
work_struct structure has a data field which you can initialize using atomic_long_set

See if this post helps

http://tuxthink.blogspot.com/2011/09...-creation.html

There might be other methods to do it too.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] shell scripting: value of argument dissapears depending on argument order akelder Programming 5 03-21-2011 11:27 PM
FLAC files: to convert or not to convert to CD-DA. stf92 Linux - Software 2 12-24-2010 11:58 AM
How can I convert makefile argument "toupper" (and "tolower")? daat99 Programming 4 12-04-2010 10:49 AM
[SOLVED] Using convert from imagemagick package to convert multiple jpg files janis_169 Linux - Newbie 5 07-18-2010 04:22 PM
message sending failed : Error[22 ] invalid argument .....but each and every argument rakeshranjanjha Linux - Software 2 01-07-2008 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration