lkml.org 
[lkml]   [2004]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: What does atomic_read actually do?
From
Date

> 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/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.051 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site