[En-Nut-Discussion] Removal of 8-bit AVR support (Re: STM32L051 and LPUART)

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Oct 31 11:02:18 CET 2016

>>>>> "Nathan" == Nathan Moore <nategoose at gmail.com> writes:

    Nathan> On Tue, Oct 25, 2016 at 5:19 AM, Uwe Bonnes <
    Nathan> bon at elektron.ikp.physik.tu-darmstadt.de> wrote:

    >> Another thing is the protection of 2 and 4 byte variables with a
    >> Critical section. This is not needed with 32-bit systems. But a look
    >> at nut/dev/ shows that only the old u(s)art driver use it. So it is
    >> legacy, but does not hamper us beside carrying old code around.

    Nathan> I started to write some Critical macros that would take a
    Nathan> parameter to test for size and alignment to determine if they
    Nathan> should actually do anything, but while doable in GCC that got
    Nathan> complicated quickly.  Is that something that people would find
    Nathan> useful?  Is that something that people would trust and/or use
    Nathan> correctly?  Alternately, a family of Critical macros with size
    Nathan> suffixes could be written for each architecture and not rely so
    Nathan> much on the preprocessor and compiler to get it right.

Did you have a look at the gcc atomic macros?
and friends
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------

More information about the En-Nut-Discussion mailing list