Browse Source

also check is_loaded without lock

Samuel Thibault 13 years ago
parent
commit
7684f0b8b5
1 changed files with 1 additions and 1 deletions
  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)
 void _starpu_load_perfmodel(struct starpu_perfmodel_t *model)
 {
 {
-	if (!model)
+	if (!model || model->is_loaded)
 		return;
 		return;
 
 
 	/* If the model has already been loaded, there is nothing to do */
 	/* If the model has already been loaded, there is nothing to do */