* fast interrupts?
@ 2002-06-08 9:11 Anshuman Rawat
2002-06-08 9:58 ` Elias Athanasopoulos
0 siblings, 1 reply; 4+ messages in thread
From: Anshuman Rawat @ 2002-06-08 9:11 UTC (permalink / raw)
To: linux-newbie
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fast interrupts?
2002-06-08 9:11 fast interrupts? Anshuman Rawat
@ 2002-06-08 9:58 ` Elias Athanasopoulos
2002-06-08 19:30 ` Anshuman Rawat
0 siblings, 1 reply; 4+ messages in thread
From: Elias Athanasopoulos @ 2002-06-08 9:58 UTC (permalink / raw)
To: Anshuman Rawat; +Cc: linux-newbie
On Sat, Jun 08, 2002 at 05:11:01AM -0400, Anshuman Rawat wrote:
> 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
--
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fast interrupts?
2002-06-08 9:58 ` Elias Athanasopoulos
@ 2002-06-08 19:30 ` Anshuman Rawat
2002-06-08 23:38 ` Elias Athanasopoulos
0 siblings, 1 reply; 4+ messages in thread
From: Anshuman Rawat @ 2002-06-08 19:30 UTC (permalink / raw)
To: Elias Athanasopoulos; +Cc: linux-newbie
> On Sat, Jun 08, 2002 at 05:11:01AM -0400, Anshuman Rawat wrote:
> > 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
>
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fast interrupts?
2002-06-08 19:30 ` Anshuman Rawat
@ 2002-06-08 23:38 ` Elias Athanasopoulos
0 siblings, 0 replies; 4+ messages in thread
From: Elias Athanasopoulos @ 2002-06-08 23:38 UTC (permalink / raw)
To: Anshuman Rawat; +Cc: linux-newbie
On Sat, Jun 08, 2002 at 03:30:03PM -0400, Anshuman Rawat wrote:
> 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
--
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-08 23:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-08 9:11 fast interrupts? Anshuman Rawat
2002-06-08 9:58 ` Elias Athanasopoulos
2002-06-08 19:30 ` Anshuman Rawat
2002-06-08 23:38 ` Elias Athanasopoulos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox