c - Why to make a interrupt handler as static.is it necessary -
during reading book ( linux kernel development robert love ) page no:119 got "the interrupt handler marked static because never called directly file."
e,g
static irqreturn_t intr_handler(int irq, void *dev)
but why so,i doubt function going call kernel , if make static how kernel going call this.
according this, way function used "registering" kernel. is, there's function such installinthdlr
call , pass pointer handler. kernel can use pointer call function itself.
my guess, though i'm not sure this, static
used way of enforcing proper usage of interrupt handler. is, since static functions can't called other files, forces pass pointer instead of calling directly.
Comments
Post a Comment