[lkml]   [2002]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it
    On Thu, 2002-08-08 at 23:11, Luca Barbieri wrote:
    > - Had inline assembly for things the compiler should be able to generate
    > on its own

    The compiler is free to generate them several other ways

    > - Didn't work on SMP (irrelevant in practice, but we already need that
    > in asm-generic/atomic.h for parisc so m68k gets it for free)

    Doesn't matter

    > The actual assembly generated should be the same and the header is
    > shorter.

    Possibly not - volatile doesnt guarantee the compiler won't do

    x = 1
    add *p into x
    store x into *p

    The general idea looks fine, but you can't drop asm stuff for volatile C
    and be sure you will get away with it. On M68K it works because the
    instructions it forces are those guaranteed to be indivisible relative
    to an interrupt. You lose that assumption.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:27    [W:0.023 / U:34.708 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site