|
From: <sv...@va...> - 2009-07-11 14:36:11
|
Author: bart
Date: 2009-07-11 15:35:59 +0100 (Sat, 11 Jul 2009)
New Revision: 10429
Log:
Clarified an implementation choice.
Modified:
trunk/drd/drd_load_store.c
Modified: trunk/drd/drd_load_store.c
===================================================================
--- trunk/drd/drd_load_store.c 2009-07-11 14:14:58 UTC (rev 10428)
+++ trunk/drd/drd_load_store.c 2009-07-11 14:35:59 UTC (rev 10429)
@@ -557,11 +557,14 @@
case Ist_CAS:
if (instrument)
{
- /* Just treat this as a read of the location. I believe
- this is equivalent to the previous logic, which
- observed bus-lock/unlock Ist_MBEs, and ignored all
- writes within sections bracketed by bus-lock and
- bus-unlock annotations. */
+ /*
+ * Treat compare-and-swap as a read. By handling atomic
+ * instructions as read instructions no data races are reported
+ * between conflicting atomic operations nor between atomic
+ * operations and non-atomic reads. Conflicts between atomic
+ * operations and non-atomic write operations are still reported
+ * however.
+ */
Int dataSize;
IRCAS* cas = st->Ist.CAS.details;
tl_assert(cas->addr != NULL);
|