avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] "#pragma reentrant" no effect in avr-GCC ?


From: Tobias Drößler
Subject: Re: [avr-chat] "#pragma reentrant" no effect in avr-GCC ?
Date: Thu, 02 Oct 2008 09:43:53 +0200
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

Julius Luukko schrieb:
On Thursday 02 October 2008, Tobias Drößler wrote:
Hey,

my question is in the subject-line ...

i try to understand  some  c-sources ...



i read that this line  in "genearal" c (compiler depended)  means that
the function(s)  can be re-entered while it is already running.
but compiled with the avr-gcc -- there is no effect in the programcode,
or is that wrong?


Hello,

Sorry, this does not answer to your question at all, but here goes:

Reentrancy is not, in my opinion, something that the compiler should be made responsible for. In general, a function is reentrant if it

1. does not use shared resources (data, hardware) in a nonatomic way
2. does not call any functions that are nonreentrant.

What exactly does that pragma do in the compiler that your code is made for? Does it disable interrupts during the whole execution of the function?

i don't know  for which compiler the  the code is written ...

but in the avr-gcc manual there is nothing about it ... so i think the line will not affect the program




reply via email to

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