lkml.org 
[lkml]   [2007]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/24] make atomic_read() behave consistently on alpha
    Date
    > We can't have split stores because we don't use atomic64_t on 32-bit 
    > architectures.

    That's not true; the compiler is free to split all stores
    (and reads) from memory however it wants. It is debatable
    whether "volatile" would prevent this as well, certainly
    it is unsafe if you want to be portable. GCC will do its
    best to not split volatile memory accesses, but bugs in
    this area do happen a lot (because the compiler code for
    volatile isn't as well exercised as most other compiler
    code, and because it is simply a hard subject; and there
    is no real formalised model for what GCC should do).

    The only safe way to get atomic accesses is to write
    assembler code. Are there any downsides to that? I don't
    see any.


    Segher

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-08-09 18:03    [W:3.696 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site