From 2fbddccbb035e45db7da1f5e23df14f4d0fcda9f Mon Sep 17 00:00:00 2001 From: Brian Demsky Date: Thu, 4 Oct 2012 17:37:12 -0700 Subject: [PATCH] changes --- model.cc | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/model.cc b/model.cc index b916d8c..dd72fdb 100644 --- a/model.cc +++ b/model.cc @@ -1516,6 +1516,10 @@ bool ModelChecker::resolve_promises(ModelAction *write) } else promise_index++; } + + //Check whether reading these writes has made threads unable to + //resolve promises + for(unsigned int i=0;iget_location(); for (unsigned int i = 0; i < promises->size(); i++) { @@ -1571,7 +1601,10 @@ void ModelChecker::mo_check_promises(thread_id_t tid, const ModelAction *write) if ( act->get_location() != location ) continue; - if ( act->get_tid()==tid) { + //same thread as the promise + if ( act->get_tid()==tid ) { + + //do we have a pwrite for the promise, if not, set it if (promise->get_write() == NULL ) { promise->set_write(write); } -- 2.34.1