There was a thread on the egcs list about this a few months
ago. GCC does not guarantee that incrementing a volatile will do it in
a single instruction, even if a single instruction is available.
The value won't be cached (mod. compiler bugs), but it may be loaded,
incremented and then stored. And the store may be deferred past other
non-volatile operations and function calls.
As we all know "incl" is not atomic between competing processors, but it
is atomic w.r.t. interrupts on the same processor as the increment.
Maybe that's why someone thought it was important.
But as Andrea says:
> The only "jiffies" writer is the timer irq handler that as an irq handler
> is single threaded by the linux irq design. So there's no point at all to
> even think about atomicity.
So jiffies++ would be fine.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/