[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f22d86810910261019yc77dbf0sa7688a98e7b98267@mail.gmail.com>
Date:	Mon, 26 Oct 2009 22:49:30 +0530
From:	"Leonidas ." <leonidas137@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Difference 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.
E.g.
void * ptr = (void *) str;
smb_mb();
Will this not atomically update ptr? Ptr will be seen by all cpu's in
same state
after it has been assigned str, right?
-Leo.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
