fast interrupts?
Hi,
I am new both to this list and linux and i need help. have started reading the book by Michael Beck...
am not clear about register saving in fast interrupts...
the book says...
while handling a fast interrupt, only those registers are saved that are modified by a normal C function (?). This means that , if assmbler code is to be used in the handling routine, the remaining registers (?) must be saved beforehand and restored afterwards.
what does the author mean by registers modified by a normal C function, and the remaining registers?
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 7 lines · Anshuman Rawat
while handling a fast interrupt, only those registers are saved that are modified by a normal C function (?). This means that , if assmbler code is to be used in the handling routine, the remaining registers (?) must be saved beforehand and restored afterwards.
what does the author mean by registers modified by a normal C function, and the remaining registers?
A CPU has some registers in order to store data and process them using the internal command set of the architecture. Registers are the internal "memory" of the CPU.
In the program flow, when the control is taken by a function (this is not only for C), some values are stored to specific registers. This helps the CPU to know what to do (i.e. in which mem address will start reading) when the function returns.
Elias
Signature · 6 lines
http://gnewtellium.sourceforge.net MP3 is not a crime. - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 4 lines · Anshuman Rawat
Quoted 2 lines
while handling a fast interrupt, only those registers are saved that are modified by a normal C function (?). This means that , if assmbler code
is
Quoted 3 lines
Quoted 3 lines
to be used in the handling routine, the remaining registers (?) must be saved beforehand and restored afterwards.
what does the author mean by registers modified by a normal C function,
and
Quoted 6 lines
Quoted 1 line
the remaining registers?
A CPU has some registers in order to store data and process them using the internal command set of the architecture. Registers are the internal "memory" of the CPU.
Quoted 7 lines
In the program flow, when the control is taken by a function (this is not only for C), some values are stored to specific registers. This helps the CPU to know what to do (i.e. in which mem address will start reading) when the function returns.
Elias
so it means that only those registers are saved that were being used by the process which was interrupted? or only those which the process was using and the intr. handling routine will also use?
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 3 lines · Anshuman Rawat
so it means that only those registers are saved that were being used by the process which was interrupted? or only those which the process was using and the intr. handling routine will also use?
No. The text just warns you that if you use assembly code inside the interrupt handler you'll have to save the registers you plan to modify and restore them afterwards. This isn't the case with the registers which are stored when a C function takes control (SP register, etc.).
A process does not use specific registers (all the registers are modified during the execution of a program), but when a function takes control some specific registers are saved, such as the Stack Pointer register.
Elias
Signature · 6 lines
http://gnewtellium.sourceforge.net MP3 is not a crime. - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs