Messages in this thread | | | Subject | Re: What does atomic_read actually do? | From | Arjan van de Ven <> | Date | Mon, 20 Dec 2004 12:51:39 +0100 |
| |
> 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, > even > 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 > authoritatively > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |