[avr-libc-dev] [bug #14616] definition of sei() in interrupts.h is faulty

2005-09-26 Thread anonymous
Follow-up Comment #5, bug #14616 (project avr-libc): The unfortunate thing is, that using volatile is not enough. Even if it works for your extremely simple test case: I am having a more complex test case example in my application code, where it does *not* work because gcc reorders the

[avr-libc-dev] [bug #14503] strnlen_P is wrong with classic AVRs

2005-09-26 Thread Anatoly Sokolov
Update of bug #14503 (project avr-libc): Status:None = Fixed Open/Closed:Open = Closed ___ Follow-up Comment #1: Fixed 2005-09-26.

Re: [avr-libc-dev] [bug #14616] definition of sei() in interrupts.h is faulty

2005-09-26 Thread Joerg Wunsch
As anonymous wrote: FYI: I had started with code like { uint8_t temp = SREG; asm volatile (cli : :); volatile_declared_uint16_t_var_in_memory = value; SREG = temp; } Here gcc had reordered it such that it would read { uint8_t temp = SREG; asm volatile (cli : :);

Re: [avr-libc-dev] [bug #14616] definition of sei() in interrupts.h is faulty

2005-09-26 Thread Joerg Wunsch
As Russell Shaw wrote: Linux code has rmb() and wmb() for read memory barrier and write memory barrier, to solve that reordering problem. Something might be learned from finding how those macros are defined. They end up in a spaghetti of header files, but if my brain can trace that right,

Re: [avr-libc-dev] [bug #14616] definition of sei() in interrupts.h is faulty

2005-09-26 Thread Björn Haase
Dmitry K. wrote on Dienstag, 27. September 2005 05:03 : On Tuesday 27 September 2005 01:54, Björn wrote: Follow-up Comment #5, bug #14616 (project avr-libc): The unfortunate thing is, that using volatile is not enough. Even if it works for your extremely simple test case: I am having a