[lkml]   [2009]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectDifference between atomic operations and memory barriers
Trying to understand difference between atomic ops and memory barriers.

I was thinking all atomic operations must be using barrier internally,
but I read
somewhere that only some of them use barriers. Sorry for being vague here.

Operations before call to smp_mb() will not be re-ordered and all cpus will see
consistent value after the variable is updated.

void * ptr = (void *) str;

Will this not atomically update ptr? Ptr will be seen by all cpu's in
same state
after it has been assigned str, right?


 \ /
  Last update: 2009-10-26 18:21    [W:0.055 / U:25.204 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site