title: How to limits number of interrupts in a OS?
body: <p>I am new to Linux Kernel. I was reading about the Linux Kernel from "Linux Kernel Development , Robert Love 3rd Edition, chapter 7 Interrupts and Interrupts Handler". For registering a interrupt handler , Linux uses request_irq() function as :  </p>
  
  <pre><code>int request_irq(  
      unsigned int irq ,  
      irq_handler_t handler,  
      unsigned long flags ,
      const char *name,
      void *dev)
  </code></pre>
  
  <p>Since i am a new guy for Linux Kernel , so i have some doubts regarding interrupts in Linux  :  </p>
  
  <pre><code>Q1 -&gt; Are interrupt lines are software or hardware ?  
  Q2 -&gt; "irq" , first argument passed to request_irq() , is it interrupt line number or interrupt number ?
  Q3 -&gt; If interrupt line is hardware then , is it the criteria to limit the number of different interrupts an OS can support , if it is not then how we limit the number of different interrupts an OS can support ?
  </code></pre>
  
  <p>One more help , when i was reading , i got struck at these lines :  </p>
  
  <p>"Note that request_irq() can sleep and therefore can not be called from interrupt context or other situations where code can not block . It is common mistake to call request_irq() when it is unsafe to sleep.This partly because of why request_irq() can block : It is indeed clear. (Page number : 117)"  </p>
  
  <p>I am unable to get the meaning of these lines , why request_irq() is not safe and how ? And i am also not able to understand what exactly the interrupt context means ?  </p>
  
  <p>For any kind of help , i will be grateful to you!<br>
  thank you!</p>