Re: What does atomic_read actually do?
From: Arjan van de Ven
Date: Mon Dec 20 2004 - 06:59:10 EST
> I'm aware of that. I'm not asking a question about x86 architecture. I'm
> asking what guarantees that the compiler will load the int using one MOV
> instruction since there's nothing in the C standard that requires that,
> for volatile. I think it's unlikely the compiler would use multiple loads
> a byte at a time but it really requires a compiler person to
> make that statement.
well... nothing really guarantees it other than that it's rather really
hard to NOT do it with one mov. And the gcc people care about their
quality of implementation enough that they will never do this...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/