[lkml]   [1999]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: set_current_state
    Jamie Lokier <> writes:

    Andrea Arcangeli wrote:
    > >AFAIK the ordering of volatile operations is only defined with respect
    > >to each other.
    > I thought the rule was different.

    I'm not absolutely sure. I read once that `volatile' accesses and I/O
    function calls are the visible side-effects of a C program, which must
    be preserved, and the compiler is free to optimise the rest as it
    likes. I think it's a C standard issue.

    Yes, it is. From 6.5.3 in the C standard:

    ...any expression referring to [an object that has volatile-qualified
    type] shall be evaluated stricltly according to the rules of the
    abstract machine... Furthermore, at every sequence point the value
    last stored in the object shall agree with that prescribed by the
    abstract machine... What constitutes an access to an object that has
    volatile-qualified type is implementation-defined.

    That's about all the C standard says about volatile accesses,

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

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