[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] generic queue library for AVR GCC?
From: |
rusty+avr-gcc-list |
Subject: |
Re: [avr-gcc-list] generic queue library for AVR GCC? |
Date: |
Wed, 17 Nov 2004 10:05:17 -0800 (PST) |
Date: Wed, 17 Nov 2004 10:30:24 -0700
From: "E. Weddington" <address@hidden>
To: David Brown <address@hidden>
Subject: Re: [avr-gcc-list] generic queue library for AVR GCC?
Cc: avr-gcc-list <address@hidden>
David Brown wrote:
>Personally, I'd like to see the addition of a "critical" function
>attribute, like in mspgcc. It is clearly readable, avoids any
>requirements for extra local variables, generates optimal code,
>and generates any required "goto out" automatically. You can use
>it on inlined functions to avoid function call overheads if you
>want.
>
>
I think that's a *great* idea!
Wouldn't that require a change to the syntax of the c language? Not
that it's a bad idea but just don't expect to see it soon unless
someone else has already proposed it to whatever committee oversees
the language.
As an aside, Java has a construct that would help here; you can put a
"try" around code that might fail and have a "finally" block that
always gets executed:
try {
begin_critical();
if (something_fails())
return;
more_code();
}
finally {
end_critical();
}
So even though there's a "return" in the try block, the "finally"
block will still get executed before the "return".
(I've been a c programmer for years and have just recently dipped my
toes in the Java waters. Java does have some nice ideas.)
- Re: [avr-gcc-list] generic queue library for AVR GCC?, (continued)
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Richard Urwin, 2004/11/16
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Geoffrey Wossum, 2004/11/16
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Richard Urwin, 2004/11/16
- Re: [avr-gcc-list] generic queue library for AVR GCC?, David Brown, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Mike Panetta, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, David Brown, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, E. Weddington, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?,
rusty+avr-gcc-list <=
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Ben L. Titzer, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, E. Weddington, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, E. Weddington, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Geoffrey Wossum, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Mike Panetta, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Mike Panetta, 2004/11/17
- Re: [avr-gcc-list] generic queue library for AVR GCC?, David Brown, 2004/11/18
- Re: [avr-gcc-list] generic queue library for AVR GCC?, Dave Hansen, 2004/11/18
- Re: [avr-gcc-list] generic queue library for AVR GCC?, E. Weddington, 2004/11/18
- Re: [avr-gcc-list] generic queue library for AVR GCC?, E. Weddington, 2004/11/18