From: Brian Demsky Date: Fri, 5 Oct 2012 00:37:12 +0000 (-0700) Subject: changes X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=2fbddccbb035e45db7da1f5e23df14f4d0fcda9f changes --- diff --git a/model.cc b/model.cc index b916d8cf..dd72fdbd 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); }