title: Linux Kernel - Get a free signal number
body: <p>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.</p>
  
  <p>So I'm looking for a kernel macro / function / work around to find generic an unused signal number.</p>
  
  <p>On user mode side I want use <code>sigaction(A_FREE_SIGNO, &amp;sig, NULL);</code> and on kernel mode side <code>send_sig_info(A_FREE_SIGNO, SEND_SIG_PRIV, task)</code>.</p>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>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.</p>
  
  <p>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?</p>