Stream thread-safe checkpoint.

Tá an tiomantas seo le fáil i:
Ben Sander
2016-03-28 04:22:20 -05:00
tuismitheoir 7934cf620d
tiomantas ec049e7f0b
D'athraigh 2 comhad le 29 breiseanna agus 8 scriosta
+2 -2
Féach ar an gComhad
@@ -288,7 +288,7 @@ void ihipStream_t::enqueueBarrier(hsa_queue_t* queue, ihipSignal_t *depSignal)
//
bool ihipStream_t::preKernelCommand()
{
_mutex.lock(); // will be unlocked in postKernelCommand
_criticalData.lock();// will be unlocked in postKernelCommand
bool addedSync = false;
// If switching command types, we need to add a barrier packet to synchronize things.
@@ -323,7 +323,7 @@ void ihipStream_t::postKernelCommand(hc::completion_future &kernelFuture)
{
_last_kernel_future = kernelFuture;
_mutex.unlock();
_criticalData.unlock(); // paired with lock from preKernelCommand
};