[lkml]   [2006]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] spinlocks: remove 'volatile'
    Linus Torvalds wrote:

    > It's not that "volatile" is the "portable way". It's that "volatile" is
    > fundamentally not sufficient for the job.

    However it does seem to be good for some things, as you say.

    The volatile casting in atomic_* and *_bit seems to be a good idea
    (now that I think about it) [1].

    Because if you had a barrier there, you'd have to reload everything
    used after an atomic_read or set_bit, etc.

    But it might be nice to wrap that in something rather than use
    volatile directly. force_reload(wordptr); maybe?

    [1] Even though I still can't tell the exact semantics of these
    operations eg. why do we need volatile at all? why do we have
    volatile in the double underscore (non-atomic) versions?

    SUSE Labs, Novell Inc.
    Send instant messages to your online friends

    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: 2006-07-08 12:47    [W:0.019 / U:43.460 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site