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 8036063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:29:41+00:00 2026-06-05T02:29:41+00:00

I am some Linux kernel space code. I want an application in user space

  • 0

I am some Linux kernel space code. I want an application in user space to be able to register a callback function in the kernel space code by calling a function in the kernel space code and passing the address of that callback function. The kernel space code would then execute the callback function at a later time when running. I believe the kernel space code should look something like this:

typedef void (*callback_func) (void);
callback_func callback;

static void registerCallBack(callback_func funct){callback = funct;}

//another kernel space method
funct();

However, I am a little unsure on the proper typedef and if this will work properly. Can anyone confirm the functionality of this or offer any advice in this area? I am unable to test this right now as I am waiting on the rest of the kernel space code to be finished.

  • 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-05T02:29:43+00:00Added an answer on June 5, 2026 at 2:29 am

    You cannot directly call to a userspace function from the kernel. One possible solution would be to use signals. From the kernel code you could send a signal to a given process. The signal handler would work then as a sort of callback function.

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

Sidebar

Related Questions

When I run some simple while loop code in linux user space and kernel
I'm wrapping up user space linux socket functionality in some C++ for an embedded
I'm taking my first crack at writing some linux kernel code, and I'm hitting
Recently, I am reading some Linux kernel space codes, I see this uint64_t used;
I was browsing some code in the linux kernel and I came across the
Okay, I'm reading about Linux kernel development and there are some code snippets using
Browsing the Linux kernel sources I found some piece of code where a block
I'm making a small kernel module to provide user-space access to some kernel-mode only
In the Linux kernel source code I found this function: static int __init clk_disable_unused(void)
I am writing a User Space mapped application using /dev/mem . Is there some

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.