Stream thread-safe checkpoint.

Moving data structures to critical / protected section.


[ROCm/hip commit: 3f18bab2c7]
This commit is contained in:
Ben Sander committed 2016-03-28 09:46:40 -05:00
1 parent 0f11beb328
commit 9e3ac64c54
5 files changed
+171 -129

No files matched your search

+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);
}