Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8448307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:23:28+00:00 2026-06-10T10:23:28+00:00

I try to programm a Event-Workqueue, but I meet some problems. I use a

  • 0

I try to programm a Event-Workqueue, but I meet some problems.

I use a Linux 2.6.36 Kernel. And the DECLARE_WORK function changed from 3 parameters to 2.

The question is, the old declaration was

 DECLARE_WORK  (struct work_struct name,  void (*func)(void *),  void *data); 

And the new one is

 DECLARE_WORK  (struct work_struct name,  void (*func)(void *)); 

I think the void *data pointer was to give the func parameters. Is that right?
And how can I do that with the new version of DECLARE_WORK?

Thanks for the help

Peter

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:23:30+00:00Added an answer on June 10, 2026 at 10:23 am

    DECLARE_WORK is primarily for static work items, where no instance data is needed. You want INIT_WORK. Use this to initialize a work_struct that is a member of another structure (of your choosing), then use container_of in the callback to get the pointer to the containing structure. This container_of pattern is extremely common in the Linux kernel, so it’s a good idea to get familiar with it!

    You can see an example of this with wl1271_netstack_work – take a look at the initialization point and the callback.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My program use UdpClient to try to receive 27 responses from 27 hosts. The
I am try to read the following string, captured from a log4net UdpAppender. <log4net:event
I try to run a medium sized programm with a lot of external jars
i try to program a LdapAuthentication and i need some help. First i need
When I try my program on my win2k8 machine it runs fine but on
In my program I generate classes dynamically but when I try: String[] args =
i try to compile a java program but in the import section of the
I try to modify a .cs class with an external program in the pre-compile-event.
Is it possible to catch the uninstall event and execute some code when the
I try to implement memory mapped technics in my OpenCL program, but it's doesn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.