Re: Interrupt Context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 11 Jul 2005, Karane Mariano Vieira wrote:

> Just a silly doubt,
> 
> when the schedule() runs activated by the timer interrupt handler, it
> runs in which context? interrupt context?

The function schedule() is never directly activated by the
timer interrupt handler.

Instead, when the timer irq handler notices the scheduler
should run, it sets a flag.  After the irq handler has
finished (and quit), the part of the kernel that is
responsible for switching back to userspace mode notices
that the flag got set.

That part of the kernel, running in process context,
then calls the scheduler.

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux