Преглед изворни кода

sc_hypervisor: fix multiple definition

Nathalie Furmento пре 6 година
родитељ
комит
bed186733f
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 2 1
      sc_hypervisor/src/sc_hypervisor.c
  2. 2 3
      sc_hypervisor/src/sc_hypervisor_intern.h

+ 2 - 1
sc_hypervisor/src/sc_hypervisor.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2017                                Inria
- * Copyright (C) 2012-2014,2016,2017                      CNRS
+ * Copyright (C) 2012-2014,2016,2017,2019                 CNRS
  * Copyright (C) 2014,2017                                Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 #include <sc_hypervisor_policy.h>
 #include <starpu_config.h>
 
+struct sc_hypervisor hypervisor;
 starpu_pthread_mutex_t act_hypervisor_mutex;
 double hyp_overhead = 0.0;
 unsigned imposed_resize = 0;

+ 2 - 3
sc_hypervisor/src/sc_hypervisor_intern.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2013                                Inria
- * Copyright (C) 2012,2013,2016,2017                      CNRS
+ * Copyright (C) 2012,2013,2016,2017,2019                 CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -111,8 +111,7 @@ struct sc_hypervisor_adjustment
 	int nworkers;
 };
 
-struct sc_hypervisor hypervisor;
-
+extern struct sc_hypervisor hypervisor;
 
 void _add_config(unsigned sched_ctx);