[Top][All Lists]

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

Re: [avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK

From: Weddington, Eric
Subject: Re: [avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK
Date: Mon, 30 Apr 2012 15:52:30 +0000

> -----Original Message-----
> From: address@hidden [mailto:avr-
> address@hidden On Behalf Of Georg-
> Johann Lay
> Sent: Monday, April 30, 2012 9:03 AM
> To: address@hidden
> Cc: Jörg Wunsch
> Subject: [avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK
> AVR-LIbC's ISR-macros lead to confusing results for code like, e.g.
> #include <avr/io.h>
> #include <avr/interrupt.h>
> void *p;
> {
>      char c[10];
>      p = c;
> }
> which resolves a.a. to
> void __vector_21 (void)
> __attribute__ ((signal,used,externally_visible)) __attribute__((interrupt));
> Which states that IRQs are turned off (signal) and IRQs are turned on
> (interrupt) at the same time.

I haven't looked at the avr-libc code in a long time; I didn't know it actually 
generated that. :-/

I agree that it shouldn't do that, and it should generate clean code.

> This leads to unexpected code generated by the compiler.
> Thus, I'd like to introduce an error in avr-gcc saying
> "function can only be one of 'interrupt', 'signal', 'OS_task', 'OS_main'
> at the same time"

What should OS_task and OS_main be? OS_main as uninterruptable? OS_task as 

I have no problem with throwing an error in avr-gcc, as long as we get avr-libc 
fixed at the same time.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]