projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make linux_rw locks work again
[model-checker.git]
/
action.cc
diff --git
a/action.cc
b/action.cc
index 5e050810e7526408828b27c74cad76fcdef95a4b..1a819eaf5584f1e97e88fca439104392c07b7f1b 100644
(file)
--- a/
action.cc
+++ b/
action.cc
@@
-111,6
+111,11
@@
bool ModelAction::is_write() const
return type == ATOMIC_WRITE || type == ATOMIC_RMW || type == ATOMIC_INIT;
}
return type == ATOMIC_WRITE || type == ATOMIC_RMW || type == ATOMIC_INIT;
}
+bool ModelAction::could_be_write() const
+{
+ return is_write() || is_rmwr();
+}
+
bool ModelAction::is_rmwr() const
{
return type == ATOMIC_RMWR;
bool ModelAction::is_rmwr() const
{
return type == ATOMIC_RMWR;
@@
-217,11
+222,11
@@
bool ModelAction::could_synchronize_with(const ModelAction *act) const
// Explore interleavings of seqcst writes to guarantee total order
// of seq_cst operations that don't commute
// Explore interleavings of seqcst writes to guarantee total order
// of seq_cst operations that don't commute
- if ((
is_write() || act->is
_write()) && is_seqcst() && act->is_seqcst())
+ if ((
could_be_write() || act->could_be
_write()) && is_seqcst() && act->is_seqcst())
return true;
// Explore synchronizing read/write pairs
return true;
// Explore synchronizing read/write pairs
- if (is_read() && is_acquire() && act->
is
_write() && act->is_release())
+ if (is_read() && is_acquire() && act->
could_be
_write() && act->is_release())
return true;
// Otherwise handle by reads_from relation
return true;
// Otherwise handle by reads_from relation