Subject:
|
__attribute__ ((rcx_interrrupt)) : how to use ?
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Mon, 31 Jan 2000 21:00:51 GMT
|
Viewed:
|
2384 times
|
| |
| |
hi there, i´m still not really sure when and why to use __attribute__
((rcx_interrrupt))
my current assumptions:
1 - it should be used for functions that are called AS interrupt
handlers, to make sure registers are pushed onto the stack, and restored
correctly when function returns.
2 - there is another way to achieve similar behaviour, in case the
compiler doesn´t have the patch: it is to call the Macro
HANDLER_WRAPPER, what will push r0 to r3, call the wrapped function, pop
the registers, and return.
Now my questions:
1 - What is the actual affect of the attribute ?
2 - Is it faster to use __attribute__ ((rcx_interrrupt)) instead of
HANDLER_WRAPPER, and if so, why ?
3 - What about functions that are called FROM IRQ-handlers, like
lnp_integrity_byte(), or dsound_handler(). Under which conditions do
they have to be declared with the __attribute__ ? -- dsound_handler()
has it, lnp_integrity_byte() does not.
4 - If a function may be called normally or as IRQ-handler, does it harm
to specify the __attribute__ ?
thanks in advance for any hints, Martin
|
|
Message has 1 Reply:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|