On 2006-03-20, Stokes, Mark <[email protected]> wrote:
> This may sound like a completely stupid question at this
> point, but why not simply use the "wakeup" function modifier?
Because that wakes up the processor unconditionally at the end
of the interrupt service routine. I only want to wake up the
processor under certain conditions (e.g. a complete frame has
been received via a serial link).
> Such as in this example:
>
> interrupt (BASICTIMER_VECTOR) wakeup BasicTimerIRQ(void)
>
> You never said which power mode
It doesn't matter. You get the warning regardless of which
power mode you're switching from.
> or in which type of function you are trying to switch modes
> from.
I'm switching modes from an ISR. The only place you can use
_BIC_SR_IRQ() is from an ISR.
> I had the same problem w/ the warning for many months and I
> decided I didn't like it, so I changed my code to use this and
> it works perfectly, no warning.
Your solution only works if you need to wake up the processor
on _every_ interrupt. That's not what I need to do.
> Personally, I don't like patching the compiler just to remove
> a warning.
Neither do I, but I dislike even more shipping code that won't
build cleanly. I always use -Wall -Werror, and I'll fix the
compiler before I'll ship code that won't compile without
warnings.
> Especially when there is a good way to avoid that warning.
There isn't.
> That's why there are compiler switches that allow certain
> warnings to be ignored.
Which compiler switch disables that warning?
--
Grant Edwards grante Yow! It's a lot of fun
at being alive... I wonder if
visi.com my bed is made?!?