[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] Re: bug #22163 (atomic not working as expectedinC++)
From: |
Weddington, Eric |
Subject: |
RE: [avr-libc-dev] Re: bug #22163 (atomic not working as expectedinC++) |
Date: |
Wed, 9 Jun 2010 13:32:39 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Joerg Wunsch
> Sent: Wednesday, June 09, 2010 1:20 PM
> To: address@hidden
> Subject: Re: [avr-libc-dev] Re: bug #22163 (atomic not
> working as expectedinC++)
>
> As Stu Bell wrote:
>
> Linux is not time-critical, unlike many things that run on
> microcontrollers. Moving a couple of instructions around does not
> matter in a complex operating system. The code where we came to
> the conclusion mentioned above was something like:
>
> void foo(void)
> {
> some_temp_variable = result_of_expensive_computation;
> /* I think it's been a division. */
> cli();
> something_time_cricital = some_temp_variable;
> sei();
> }
>
As a side note, wouldn't declaring some_temp_variable as volatile solve the
issue above?
- [avr-libc-dev] bug #22163 (atomic not working as expected in C++), Joerg Wunsch, 2010/06/09
- [avr-libc-dev] Re: bug #22163 (atomic not working as expected in C++), Dean Camera, 2010/06/09
- [avr-libc-dev] Re: bug #22163 (atomic not working as expected in C++), David Brown, 2010/06/09
- [avr-libc-dev] Re: bug #22163 (atomic not working as expected in C++), Dean Camera, 2010/06/09
- [avr-libc-dev] Re: bug #22163 (atomic not working as expected in C++), Joerg Wunsch, 2010/06/09
- RE: [avr-libc-dev] Re: bug #22163 (atomic not working as expected inC++), Stu Bell, 2010/06/09
- Re: [avr-libc-dev] Re: bug #22163 (atomic not working as expected inC++), Joerg Wunsch, 2010/06/09
- RE: [avr-libc-dev] Re: bug #22163 (atomic not working as expectedinC++),
Weddington, Eric <=
- Re: [avr-libc-dev] Re: bug #22163 (atomic not working as expectedinC++), Joerg Wunsch, 2010/06/09
- RE: [avr-libc-dev] Re: bug #22163 (atomic not working asexpectedinC++), Weddington, Eric, 2010/06/09
- RE: [avr-libc-dev] Re: bug #22163 (atomic not working as expectedinC++), Stu Bell, 2010/06/09
- Re: [avr-libc-dev] Re: bug #22163 (atomic not working as expected inC++), David Brown, 2010/06/09
- Re: [avr-libc-dev] Re: bug #22163 (atomic not working as expected inC++), Joerg Wunsch, 2010/06/09
- Re: [avr-libc-dev] Re: bug #22163 (atomic not working as expected inC++), David Brown, 2010/06/10
[avr-libc-dev] Re: bug #22163 (atomic not working as expected in C++), Joerg Wunsch, 2010/06/09