Explorar o código

also check is_loaded without lock

Samuel Thibault %!s(int64=13) %!d(string=hai) anos
pai
achega
7684f0b8b5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/perfmodel/perfmodel.c

+ 1 - 1
src/core/perfmodel/perfmodel.c

@@ -131,7 +131,7 @@ extern pthread_rwlock_t registered_models_rwlock;
 
 void _starpu_load_perfmodel(struct starpu_perfmodel_t *model)
 {
-	if (!model)
+	if (!model || model->is_loaded)
 		return;
 
 	/* If the model has already been loaded, there is nothing to do */