[Top][All Lists]

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

Re: [avr-libc-dev] Deprecation policy [was: Re: [RFC][PATCH] Deprecate

From: Dmitry K.
Subject: Re: [avr-libc-dev] Deprecation policy [was: Re: [RFC][PATCH] Deprecate inb / outb.]
Date: Thu, 19 Jun 2003 08:57:50 +1100
User-agent: KMail/1.5

Good morning!

18 Jun 2003 21:26 Joerg Wunsch wrote:
> You need even a third alternative here, for the extended registers of
> the ATmega128.
Thank, I have lost sight of it.

> If you really need a macro for this, something like the following
> should usually work:
> #define atomic(op) \
> do { unsigned char __saved_sreg = SREG; cli();\
> op; \
> SREG = __saved_sreg; } while (0)
You are absolutely right, having placed a line "op;" before restoration of 
former contents SREG. To make on the contrary in _C_-macro would be too 
thoughtless decision. Though it also increases a interrupt latency.

Yours sincerely,

P.S. The problem ID #2233 can be counted solved?

reply via email to

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