That's not related to this patch, but it caught my attention: why are we using "volatile" here?
My understanding is that "volatile" should only be used to deal with special memory (like MMIO), but I don't think this it is the case here. (or is it?)
Here it seems that "volatile" is using to do inter-thread communication, but that's in general wrong: it doesn't protect from data races and it doesn't ensure atomicity.
What am I missing?
Giovanni.
I guess it’s to force a memory load on each call, which could be omitted if the function is inlined. X86 loads are atomic IIRC. - Jan