On 7/10/05, Deepak Joshi <deepak_cins@xxxxxxxxxxx> wrote: > Hi all, > > I read one statement in LDD in 6th chapter about > interrupt. > > "The current pointer is not valid in interrupt mode > and can't be used". > > I am not able to get it. Can anybody plz explain me > what author want to convey by using above statement. In linux kernel, the variable "current" points to the task structure of the current process running. When an interrupts occurs, then the kernel switches to interrupt mode which does not fall under current process context. So even though the value of variable "current" might point to a valid task structure, it should not be used since there is no current process running. > > Also i have one confusion. After processing an > interrupt i.e. executing an interrupt handler routine > will it continoues to execute the same process or > context switch is possible to happen and after that it > will wake up a blocked process like a driver waiting > for some event. No, returning from interrupt involves kernel looking for a reschedule flag and depending on the flag it will call the schedule function to perform a scheduling. If the scheduler chooses the process which was earlier running, only then the same process will get the time-slice. To answer in short : A context swich is possible. HTH Ketan -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/