I want to implement a signal link from kernel to user mode. At the moment I use a free chosen signal number. But I think it could be possible that another module uses the same.
So I'm looking for a kernel macro / function / work around to find generic an unused signal number.
On user mode side I want use sigaction(A_FREE_SIGNO, &sig, NULL);
and on kernel mode side send_sig_info(A_FREE_SIGNO, SEND_SIG_PRIV, task)
.
Edit:
I see I have to add some more details: Alltogether I need six different signals. That is needed to tell the application to read or write from or to different mapped memories just in time.
At this point one single signal is not enough. If not the kernel module provide a signal number it have to be done by the application. Same question: How to get a free on the user land side?