[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] "#pragma reentrant" no effect in avr-GCC ?
From: |
Julius Luukko |
Subject: |
Re: [avr-chat] "#pragma reentrant" no effect in avr-GCC ? |
Date: |
Thu, 2 Oct 2008 10:25:53 +0300 |
User-agent: |
KMail/1.9.9 |
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?
--
Julius