Stream thread-safe checkpoint.

Moving data structures to critical / protected section.


[ROCm/clr commit: 6cab7862ae]
This commit is contained in:
Ben Sander
2016-03-28 09:46:40 -05:00
parent 03b0976e54
commit 96412bdea2
5 changed files with 171 additions and 129 deletions
+3 -2
View File
@@ -91,7 +91,8 @@ hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream)
// Clear timestamps
eh->_timestamp = 0;
eh->_marker = stream->_av.create_marker();
eh->_copy_seq_id = stream->lastCopySeqId();
eh->_copy_seq_id = stream->locked_lastCopySeqId();
return ihipLogStatus(hipSuccess);
}
@@ -139,7 +140,7 @@ hipError_t hipEventSynchronize(hipEvent_t event)
#else
eh->_marker.wait();
#endif
eh->_stream->reclaimSignals_ts(eh->_copy_seq_id);
eh->_stream->locked_reclaimSignals(eh->_copy_seq_id);
return ihipLogStatus(hipSuccess);
}