Explorar o código

Do not optimize reading the finished flag, as otherwise this may happen just while the completion code is setting it, and still needs to unlock the mutex

Samuel Thibault %!s(int64=13) %!d(string=hai) anos
pai
achega
1e2ed876c0
Modificáronse 1 ficheiros con 0 adicións e 2 borrados
  1. 0 2
      src/datawizard/copy_driver.c

+ 0 - 2
src/datawizard/copy_driver.c

@@ -326,8 +326,6 @@ int __attribute__((warn_unused_result)) _starpu_driver_copy_data_1_to_1(starpu_d
 void _starpu_driver_wait_request_completion(struct _starpu_async_channel *async_channel)
 {
 #ifdef STARPU_SIMGRID
-	if (async_channel->event.finished)
-		return;
 	_STARPU_PTHREAD_MUTEX_LOCK(&async_channel->event.mutex);
 	while (!async_channel->event.finished)
 		_STARPU_PTHREAD_COND_WAIT(&async_channel->event.cond, &async_channel->event.mutex);