- // same thread as pread
- if (pread->get_tid() == tid) {
- // make sure that the reader of this write happens after the promise
- if ((read == NULL) || (pread->happens_before(read))) {
- // do we have a pwrite for the promise, if not, set it
- if (promise->get_write() == NULL) {
- promise->set_write(write);
- // The pwrite cannot happen before pread
- if (write->happens_before(pread) && (write != pread)) {
- priv->failed_promise = true;
- return;
- }
- }
-
- if (mo_graph->checkPromise(write, promise)) {
- priv->failed_promise = true;
- return;
- }
- }
+ if (pread->happens_before(act) && mo_graph->checkPromise(write, promise)) {
+ priv->failed_promise = true;
+ return;