Ver código fonte

also check is_loaded without lock

Samuel Thibault 13 anos atrás
pai
commit
7684f0b8b5
1 arquivos alterados com 1 adições e 1 exclusões
  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 */