Reputation: 93
I am new to working in kernel space, so I hope someone can help me with the issue I am having.
I have seen a lot of questions related to implicit declaration of function for userspace c/c++ programs, but I think the issue I am having may be approached differently in kernel space.
The code I am working on is to test out signaling a user application from the driver, which I have working, but the issue was I could not use the function send_sig_info declared in linux/signal.h until I had declared it in the header of my own driver source. I figured if I had included to correct header to access the function call declared there, it should work.
So without the declaration of send_sig_info in my own header:
error: implicit declaration of function ‘send_sig_info’
And then adding to my header file:
static int send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
would allow my code to compile just fine.
Does anyone have an idea why this is?
Thanks.
Upvotes: 3
Views: 3686