Selaa lähdekoodia

rename all objects defined in include/starpu_sched_ctx.h to start with starpu_sched_ctx

Nathalie Furmento 12 vuotta sitten
vanhempi
commit
361cb9d780

+ 4 - 4
doc/chapters/advanced-api.texi

@@ -842,7 +842,7 @@ The number of workerids
 @item @code{pthread_key_t cursor_key} (optional)
 @item @code{pthread_key_t cursor_key} (optional)
 The cursor needed to iterate the collection (depending on the data structure)
 The cursor needed to iterate the collection (depending on the data structure)
 @item @code{int type}
 @item @code{int type}
-The type of structure (currently STARPU_WORKER_LIST is the only one available)
+The type of structure (currently STARPU_SCHED_CTX_WORKER_LIST is the only one available)
 @item @code{unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers)}
 @item @code{unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers)}
 Checks if there is a next worker
 Checks if there is a next worker
 @item @code{int (*get_next)(struct starpu_sched_ctx_worker_collection *workers)}
 @item @code{int (*get_next)(struct starpu_sched_ctx_worker_collection *workers)}
@@ -875,15 +875,15 @@ Delete the worker collection of the specified scheduling context
 Return the worker collection managed by the indicated context
 Return the worker collection managed by the indicated context
 @end deftypefun
 @end deftypefun
 
 
-@deftypefun pthread_mutex_t* starpu_get_changing_ctx_mutex (unsigned @var{sched_ctx_id})
+@deftypefun pthread_mutex_t* starpu_sched_ctx_get_changing_ctx_mutex (unsigned @var{sched_ctx_id})
 TODO
 TODO
 @end deftypefun
 @end deftypefun
 
 
-@deftypefun void starpu_task_set_context (unsigned *@var{sched_ctx_id})
+@deftypefun void starpu_sched_ctx_set_task_context (unsigned *@var{sched_ctx_id})
 Set the scheduling context the subsequent tasks will be submitted to
 Set the scheduling context the subsequent tasks will be submitted to
 @end deftypefun
 @end deftypefun
 
 
-@deftypefun unsigned starpu_task_get_context (void)
+@deftypefun unsigned starpu_sched_ctx_get_task_context (void)
 Return the scheduling context the tasks are currently submitted to
 Return the scheduling context the tasks are currently submitted to
 @end deftypefun
 @end deftypefun
 
 

+ 1 - 1
doc/chapters/perf-optimization.texi

@@ -228,7 +228,7 @@ int workerids[3] = @{1, 3, 10@};
 int id_ctx = starpu_sched_ctx_create("heft", workerids, 3, "my_ctx");
 int id_ctx = starpu_sched_ctx_create("heft", workerids, 3, "my_ctx");
 
 
 /* @b{let StarPU know that the folowing tasks will be submitted to this context} */
 /* @b{let StarPU know that the folowing tasks will be submitted to this context} */
-starpu_task_set_context(id);
+starpu_sched_ctx_set_task_context(id);
 
 
 /* @b{submit the task to StarPU} */
 /* @b{submit the task to StarPU} */
 starpu_task_submit(task);
 starpu_task_submit(task);

+ 3 - 3
doc/chapters/sched_ctx_hypervisor.texi

@@ -27,7 +27,7 @@ Basic strategies of resizing scheduling contexts already exist but a platform fo
 @section Managing the hypervisor
 @section Managing the hypervisor
 There is a single hypervisor that is in charge of resizing contexts and the resizing strategy is chosen at the initialization of the hypervisor. A single resize can be done at a time.
 There is a single hypervisor that is in charge of resizing contexts and the resizing strategy is chosen at the initialization of the hypervisor. A single resize can be done at a time.
 
 
-@deftypefun {struct starpu_performance_counters *} sched_ctx_hypervisor_init ({struct sched_ctx_hypervisor_policy *} @var{policy})
+@deftypefun {struct starpu_sched_ctx_performance_counters *} sched_ctx_hypervisor_init ({struct sched_ctx_hypervisor_policy *} @var{policy})
 Initializes the hypervisor to use the strategy provided as parameter and creates the performance counters (see @pxref{Performance Counters}).
 Initializes the hypervisor to use the strategy provided as parameter and creates the performance counters (see @pxref{Performance Counters}).
 These performance counters represent actually some callbacks that will be used by the contexts to notify the information needed by the hypervisor.
 These performance counters represent actually some callbacks that will be used by the contexts to notify the information needed by the hypervisor.
 @end deftypefun
 @end deftypefun
@@ -210,8 +210,8 @@ starpu_insert_task(&codelet,
 
 
 The Scheduling Context Hypervisor Plugin provides a series of performance counters to StarPU. By incrementing them, StarPU can help the hypervisor in the resizing decision making process.
 The Scheduling Context Hypervisor Plugin provides a series of performance counters to StarPU. By incrementing them, StarPU can help the hypervisor in the resizing decision making process.
 
 
-@deftp {Data Type} {struct starpu_performance_counters}
-@anchor{struct starpu_performance_counters}
+@deftp {Data Type} {struct starpu_sched_ctx_performance_counters}
+@anchor{struct starpu_sched_ctx_performance_counters}
 
 
 @table @asis
 @table @asis
 @item @code{void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time)}
 @item @code{void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time)}

+ 1 - 1
examples/sched_ctx_utils/sched_ctx_utils.c

@@ -93,7 +93,7 @@ void* start_bench(void *val)
 	pthread_setspecific(key, &p->id);
 	pthread_setspecific(key, &p->id);
 
 
 	if(p->ctx != 0)
 	if(p->ctx != 0)
-		starpu_task_set_context(&p->ctx);
+		starpu_sched_ctx_set_task_context(&p->ctx);
 
 
 	for(i = 0; i < NSAMPLES; i++)
 	for(i = 0; i < NSAMPLES; i++)
 		p->bench(p->size, p->nblocks);
 		p->bench(p->size, p->nblocks);

+ 2 - 2
examples/scheduler/dummy_sched.c

@@ -28,7 +28,7 @@ typedef struct dummy_sched_data {
 
 
 static void init_dummy_sched(unsigned sched_ctx_id)
 static void init_dummy_sched(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 
 
 	struct dummy_sched_data *data = (struct dummy_sched_data*)malloc(sizeof(struct dummy_sched_data));
 	struct dummy_sched_data *data = (struct dummy_sched_data*)malloc(sizeof(struct dummy_sched_data));
 	
 	
@@ -70,7 +70,7 @@ static int push_task_dummy(struct starpu_task *task)
 	   of them would pop for tasks */
 	   of them would pop for tasks */
 	unsigned worker = 0;
 	unsigned worker = 0;
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 

+ 20 - 24
include/starpu_sched_ctx.h

@@ -24,12 +24,8 @@ extern "C"
 {
 {
 #endif
 #endif
 
 
-#ifdef STARPU_DEVEL
-#  warning rename all objects to start with starpu_sched_ctx
-#endif
-
-//struct starpu_iterator;
-struct starpu_iterator
+//struct starpu_sched_ctx_iterator;
+struct starpu_sched_ctx_iterator
 {
 {
 	int cursor;
 	int cursor;
 };
 };
@@ -42,12 +38,12 @@ struct starpu_sched_ctx_worker_collection
 	void *workerids;
 	void *workerids;
 	/* the number of workers in the collection */
 	/* the number of workers in the collection */
 	unsigned nworkers;
 	unsigned nworkers;
-	/* the type of structure (STARPU_WORKER_LIST,...) */
+	/* the type of structure (STARPU_SCHED_CTX_WORKER_LIST,...) */
 	int type;
 	int type;
 	/* checks if there is another element in collection */
 	/* checks if there is another element in collection */
-	unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers, struct starpu_iterator *it);
+	unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers, struct starpu_sched_ctx_iterator *it);
 	/* return the next element in the collection */
 	/* return the next element in the collection */
-	int (*get_next)(struct starpu_sched_ctx_worker_collection *workers, struct starpu_iterator *it);
+	int (*get_next)(struct starpu_sched_ctx_worker_collection *workers, struct starpu_sched_ctx_iterator *it);
 	/* add a new element in the collection */
 	/* add a new element in the collection */
 	int (*add)(struct starpu_sched_ctx_worker_collection *workers, int worker);
 	int (*add)(struct starpu_sched_ctx_worker_collection *workers, int worker);
 	/* remove an element from the collection */
 	/* remove an element from the collection */
@@ -57,13 +53,13 @@ struct starpu_sched_ctx_worker_collection
 	/* free the structure */
 	/* free the structure */
 	void (*deinit)(struct starpu_sched_ctx_worker_collection *workers);
 	void (*deinit)(struct starpu_sched_ctx_worker_collection *workers);
 	/* initialize the cursor if there is one */
 	/* initialize the cursor if there is one */
-	void (*init_iterator)(struct starpu_sched_ctx_worker_collection *workers, struct starpu_iterator *it);
+	void (*init_iterator)(struct starpu_sched_ctx_worker_collection *workers, struct starpu_sched_ctx_iterator *it);
 };
 };
 
 
 /* types of structures the worker collection can implement */
 /* types of structures the worker collection can implement */
-#define STARPU_WORKER_LIST 0
+#define STARPU_SCHED_CTX_WORKER_LIST 0
 
 
-struct starpu_performance_counters
+struct starpu_sched_ctx_performance_counters
 {
 {
 	void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time);
 	void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time);
 	void (*notify_idle_end)(unsigned sched_ctx_id, int worker);
 	void (*notify_idle_end)(unsigned sched_ctx_id, int worker);
@@ -74,9 +70,9 @@ struct starpu_performance_counters
 };
 };
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
-void starpu_set_perf_counters(unsigned sched_ctx_id, struct starpu_performance_counters *perf_counters);
-void starpu_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops, size_t data_size);
-void starpu_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
+void starpu_sched_ctx_set_perf_counters(unsigned sched_ctx_id, struct starpu_sched_ctx_performance_counters *perf_counters);
+void starpu_sched_ctx_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops, size_t data_size);
+void starpu_sched_ctx_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 
 
 unsigned starpu_sched_ctx_create(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_ctx_name);
 unsigned starpu_sched_ctx_create(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_ctx_name);
@@ -102,16 +98,16 @@ void starpu_sched_ctx_delete_worker_collection(unsigned sched_ctx_id);
 struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_get_worker_collection(unsigned sched_ctx_id);
 struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_get_worker_collection(unsigned sched_ctx_id);
 
 
 #if !defined(_MSC_VER) && !defined(STARPU_SIMGRID)
 #if !defined(_MSC_VER) && !defined(STARPU_SIMGRID)
-pthread_mutex_t* starpu_get_changing_ctx_mutex(unsigned sched_ctx_id);
+pthread_mutex_t* starpu_sched_ctx_get_changing_ctx_mutex(unsigned sched_ctx_id);
 #endif
 #endif
 
 
-void starpu_task_set_context(unsigned *sched_ctx_id);
+void starpu_sched_ctx_set_task_context(unsigned *sched_ctx_id);
 
 
-unsigned starpu_task_get_context(void);
+unsigned starpu_sched_ctx_get_task_context(void);
 
 
-void starpu_notify_hypervisor_exists(void);
+void starpu_sched_ctx_notify_hypervisor_exists(void);
 
 
-unsigned starpu_check_if_hypervisor_exists(void);
+unsigned starpu_sched_ctx_check_if_hypervisor_exists(void);
 
 
 unsigned starpu_sched_ctx_get_nworkers(unsigned sched_ctx_id);
 unsigned starpu_sched_ctx_get_nworkers(unsigned sched_ctx_id);
 
 
@@ -121,13 +117,13 @@ unsigned starpu_sched_ctx_contains_worker(int workerid, unsigned sched_ctx_id);
 
 
 unsigned starpu_sched_ctx_overlapping_ctxs_on_worker(int workerid);
 unsigned starpu_sched_ctx_overlapping_ctxs_on_worker(int workerid);
 
 
-unsigned starpu_is_ctxs_turn(int workerid, unsigned sched_ctx_id);
+unsigned starpu_sched_ctx_is_ctxs_turn(int workerid, unsigned sched_ctx_id);
 
 
-void starpu_set_turn_to_other_ctx(int workerid, unsigned sched_ctx_id);
+void starpu_sched_ctx_set_turn_to_other_ctx(int workerid, unsigned sched_ctx_id);
 
 
-double starpu_get_max_time_worker_on_ctx(void);
+double starpu_sched_ctx_get_max_time_worker_on_ctx(void);
 
 
-void starpu_stop_task_submission(void);
+void starpu_sched_ctx_stop_task_submission(void);
 
 
 void starpu_sched_ctx_set_inheritor(unsigned sched_ctx_id, unsigned inheritor);
 void starpu_sched_ctx_set_inheritor(unsigned sched_ctx_id, unsigned inheritor);
 
 

+ 2 - 2
sched_ctx_hypervisor/examples/Makefile.am

@@ -13,9 +13,9 @@
 #
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
 
-AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS)
+AM_CFLAGS = -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(FXT_CFLAGS) $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) $(GLOBAL_AM_CFLAGS)
 LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ @LIBS@ $(top_builddir)/sched_ctx_hypervisor/src/libsched_ctx_hypervisor.la
 LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ @LIBS@ $(top_builddir)/sched_ctx_hypervisor/src/libsched_ctx_hypervisor.la
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/examples -I$(top_builddir)/include -I$(top_srcdir)/sched_ctx_hypervisor/include -I$(top_srcdir)/sched_ctx_hypervisor/examples -Werror=implicit
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/examples -I$(top_builddir)/include -I$(top_srcdir)/sched_ctx_hypervisor/include -I$(top_srcdir)/sched_ctx_hypervisor/examples
 AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_GLPK_LDFLAGS)
 AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_GLPK_LDFLAGS)
 
 
 if !NO_BLAS_LIB
 if !NO_BLAS_LIB

+ 3 - 3
sched_ctx_hypervisor/examples/app_driven_test/app_driven_test.c

@@ -48,7 +48,7 @@ int tag = 1;
 void* start_thread(void *arg)
 void* start_thread(void *arg)
 {
 {
 	unsigned sched_ctx = *((unsigned*)arg);
 	unsigned sched_ctx = *((unsigned*)arg);
-	starpu_task_set_context(&sched_ctx);
+	starpu_sched_ctx_set_task_context(&sched_ctx);
 
 
 	struct starpu_task *task[10];
 	struct starpu_task *task[10];
 	struct params params[10];
 	struct params params[10];
@@ -115,8 +115,8 @@ int main()
 	policy.name = "app_driven";
 	policy.name = "app_driven";
 	void *perf_counters = sched_ctx_hypervisor_init(&policy);
 	void *perf_counters = sched_ctx_hypervisor_init(&policy);
 
 
-	starpu_set_perf_counters(sched_ctx1, (struct starpu_performance_counters*)perf_counters);
-	starpu_set_perf_counters(sched_ctx2, (struct starpu_performance_counters*)perf_counters);
+	starpu_sched_ctx_set_perf_counters(sched_ctx1, (struct starpu_sched_ctx_performance_counters*)perf_counters);
+	starpu_sched_ctx_set_perf_counters(sched_ctx2, (struct starpu_sched_ctx_performance_counters*)perf_counters);
 	sched_ctx_hypervisor_register_ctx(sched_ctx1, 0.0);
 	sched_ctx_hypervisor_register_ctx(sched_ctx1, 0.0);
 	sched_ctx_hypervisor_register_ctx(sched_ctx2, 0.0);
 	sched_ctx_hypervisor_register_ctx(sched_ctx2, 0.0);
 
 

+ 4 - 4
sched_ctx_hypervisor/examples/sched_ctx_utils/sched_ctx_utils.c

@@ -97,7 +97,7 @@ void* start_bench(void *val)
 	pthread_setspecific(key, &p->id);
 	pthread_setspecific(key, &p->id);
 
 
 	if(p->ctx != 0)
 	if(p->ctx != 0)
-		starpu_task_set_context(&p->ctx);
+		starpu_sched_ctx_set_task_context(&p->ctx);
 
 
 	for(i = 0; i < NSAMPLES; i++)
 	for(i = 0; i < NSAMPLES; i++)
 		p->bench(p->mat[i], p->size, p->nblocks);
 		p->bench(p->mat[i], p->size, p->nblocks);
@@ -241,7 +241,7 @@ void construct_contexts(void (*bench)(float*, unsigned, unsigned))
 	struct sched_ctx_hypervisor_policy policy;
 	struct sched_ctx_hypervisor_policy policy;
 	policy.custom = 0;
 	policy.custom = 0;
 	policy.name = "idle";
 	policy.name = "idle";
-	struct starpu_performance_counters *perf_counters = sched_ctx_hypervisor_init(&policy);
+	struct starpu_sched_ctx_performance_counters *perf_counters = sched_ctx_hypervisor_init(&policy);
 	int nworkers1 = cpu1 + gpu + gpu1;
 	int nworkers1 = cpu1 + gpu + gpu1;
 	int nworkers2 = cpu2 + gpu + gpu2;
 	int nworkers2 = cpu2 + gpu + gpu2;
 	unsigned n_all_gpus = gpu + gpu1 + gpu2;
 	unsigned n_all_gpus = gpu + gpu1 + gpu2;
@@ -267,7 +267,7 @@ void construct_contexts(void (*bench)(float*, unsigned, unsigned))
 		p1.workers[i] = i;
 		p1.workers[i] = i;
 
 
 	p1.ctx = starpu_sched_ctx_create("heft", p1.workers, nworkers1, "sched_ctx1");
 	p1.ctx = starpu_sched_ctx_create("heft", p1.workers, nworkers1, "sched_ctx1");
-	starpu_set_perf_counters(p1.ctx, perf_counters);
+	starpu_sched_ctx_set_perf_counters(p1.ctx, perf_counters);
 	p2.the_other_ctx = (int)p1.ctx;
 	p2.the_other_ctx = (int)p1.ctx;
 	p1.nworkers = nworkers1;
 	p1.nworkers = nworkers1;
 	sched_ctx_hypervisor_register_ctx(p1.ctx, 0.0);
 	sched_ctx_hypervisor_register_ctx(p1.ctx, 0.0);
@@ -303,7 +303,7 @@ void construct_contexts(void (*bench)(float*, unsigned, unsigned))
 	/* 	p2.workers[k++] = i; */
 	/* 	p2.workers[k++] = i; */
 
 
 	p2.ctx = starpu_sched_ctx_create("heft", p2.workers, 0, "sched_ctx2");
 	p2.ctx = starpu_sched_ctx_create("heft", p2.workers, 0, "sched_ctx2");
-	starpu_set_perf_counters(p2.ctx, perf_counters);
+	starpu_sched_ctx_set_perf_counters(p2.ctx, perf_counters);
 	p1.the_other_ctx = (int)p2.ctx;
 	p1.the_other_ctx = (int)p2.ctx;
 	p2.nworkers = 0;
 	p2.nworkers = 0;
 	sched_ctx_hypervisor_register_ctx(p2.ctx, 0.0);
 	sched_ctx_hypervisor_register_ctx(p2.ctx, 0.0);

+ 1 - 1
sched_ctx_hypervisor/include/sched_ctx_hypervisor.h

@@ -171,7 +171,7 @@ struct sched_ctx_hypervisor_policy
 	void (*end_ctx)(unsigned sched_ctx);
 	void (*end_ctx)(unsigned sched_ctx);
 };
 };
 
 
-struct starpu_performance_counters *sched_ctx_hypervisor_init(struct sched_ctx_hypervisor_policy *policy);
+struct starpu_sched_ctx_performance_counters *sched_ctx_hypervisor_init(struct sched_ctx_hypervisor_policy *policy);
 
 
 void sched_ctx_hypervisor_shutdown(void);
 void sched_ctx_hypervisor_shutdown(void);
 
 

+ 1 - 1
sched_ctx_hypervisor/src/hypervisor_policies/ispeed_policy.c

@@ -77,7 +77,7 @@ static int* _get_slowest_workers(unsigned sched_ctx, int *nworkers, enum starpu_
 	int worker;
 	int worker;
 	int considered = 0;
 	int considered = 0;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 

+ 6 - 6
sched_ctx_hypervisor/src/hypervisor_policies/policy_tools.c

@@ -28,7 +28,7 @@ static int _compute_priority(unsigned sched_ctx)
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx);
 	int worker;
 	int worker;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -113,7 +113,7 @@ int* _get_first_workers(unsigned sched_ctx, int *nworkers, enum starpu_archtype
 	int worker;
 	int worker;
 	int considered = 0;
 	int considered = 0;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -181,7 +181,7 @@ unsigned _get_potential_nworkers(struct sched_ctx_hypervisor_policy_config *conf
 	unsigned potential_workers = 0;
 	unsigned potential_workers = 0;
 	int worker;
 	int worker;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 	while(workers->has_next(workers, &it))
 	while(workers->has_next(workers, &it))
@@ -304,7 +304,7 @@ static double _get_best_elapsed_flops(struct sched_ctx_hypervisor_wrapper* sc_w,
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sc_w->sched_ctx);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sc_w->sched_ctx);
         int worker;
         int worker;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -330,7 +330,7 @@ static double _get_ispeed_sample_for_type_of_worker(struct sched_ctx_hypervisor_
 
 
 	double avg = 0.0;
 	double avg = 0.0;
 	int n = 0;
 	int n = 0;
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -356,7 +356,7 @@ static double _get_ispeed_sample_for_sched_ctx(unsigned sched_ctx)
         
         
 	int worker;
 	int worker;
 	double ispeed_sample = 0.0;
 	double ispeed_sample = 0.0;
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 
 
 	if(workers->init_iterator)
 	if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);

+ 5 - 5
sched_ctx_hypervisor/src/sched_ctx_hypervisor.c

@@ -19,7 +19,7 @@
 #include <starpu_config.h>
 #include <starpu_config.h>
 
 
 unsigned imposed_resize = 0;
 unsigned imposed_resize = 0;
-struct starpu_performance_counters* perf_counters = NULL;
+struct starpu_sched_ctx_performance_counters* perf_counters = NULL;
 
 
 static void notify_idle_cycle(unsigned sched_ctx, int worker, double idle_time);
 static void notify_idle_cycle(unsigned sched_ctx, int worker, double idle_time);
 static void notify_pushed_task(unsigned sched_ctx, int worker);
 static void notify_pushed_task(unsigned sched_ctx, int worker);
@@ -125,7 +125,7 @@ static struct sched_ctx_hypervisor_policy *_select_hypervisor_policy(struct sche
 
 
 
 
 /* initializez the performance counters that starpu will use to retrive hints for resizing */
 /* initializez the performance counters that starpu will use to retrive hints for resizing */
-struct starpu_performance_counters* sched_ctx_hypervisor_init(struct sched_ctx_hypervisor_policy *hypervisor_policy)
+struct starpu_sched_ctx_performance_counters* sched_ctx_hypervisor_init(struct sched_ctx_hypervisor_policy *hypervisor_policy)
 {
 {
 	hypervisor.min_tasks = 0;
 	hypervisor.min_tasks = 0;
 	hypervisor.nsched_ctxs = 0;
 	hypervisor.nsched_ctxs = 0;
@@ -168,7 +168,7 @@ struct starpu_performance_counters* sched_ctx_hypervisor_init(struct sched_ctx_h
 	struct sched_ctx_hypervisor_policy *selected_hypervisor_policy = _select_hypervisor_policy(hypervisor_policy);
 	struct sched_ctx_hypervisor_policy *selected_hypervisor_policy = _select_hypervisor_policy(hypervisor_policy);
 	_load_hypervisor_policy(selected_hypervisor_policy);
 	_load_hypervisor_policy(selected_hypervisor_policy);
 
 
-	perf_counters = (struct starpu_performance_counters*)malloc(sizeof(struct starpu_performance_counters));
+	perf_counters = (struct starpu_sched_ctx_performance_counters*)malloc(sizeof(struct starpu_sched_ctx_performance_counters));
 	perf_counters->notify_idle_cycle = notify_idle_cycle;
 	perf_counters->notify_idle_cycle = notify_idle_cycle;
 	perf_counters->notify_pushed_task = notify_pushed_task;
 	perf_counters->notify_pushed_task = notify_pushed_task;
 	perf_counters->notify_poped_task = notify_poped_task;
 	perf_counters->notify_poped_task = notify_poped_task;
@@ -176,7 +176,7 @@ struct starpu_performance_counters* sched_ctx_hypervisor_init(struct sched_ctx_h
 	perf_counters->notify_idle_end = notify_idle_end;
 	perf_counters->notify_idle_end = notify_idle_end;
 	perf_counters->notify_submitted_job = notify_submitted_job;
 	perf_counters->notify_submitted_job = notify_submitted_job;
 
 
-	starpu_notify_hypervisor_exists();
+	starpu_sched_ctx_notify_hypervisor_exists();
 
 
 	return perf_counters;
 	return perf_counters;
 }
 }
@@ -347,7 +347,7 @@ int sched_ctx_hypervisor_get_nworkers_ctx(unsigned sched_ctx, enum starpu_archty
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx);
 	int worker;
 	int worker;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 

+ 1 - 1
src/core/jobs.c

@@ -219,7 +219,7 @@ void _starpu_handle_job_termination(struct _starpu_job *j)
 	{
 	{
 		_starpu_sched_post_exec_hook(task);
 		_starpu_sched_post_exec_hook(task);
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
-		starpu_call_poped_task_cb(workerid, task->sched_ctx, task->flops, data_size);
+		starpu_sched_ctx_call_poped_task_cb(workerid, task->sched_ctx, task->flops, data_size);
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 	}
 	}
 
 

+ 18 - 18
src/core/sched_ctx.c

@@ -124,7 +124,7 @@ static void _starpu_update_workers_without_ctx(int *workerids, int nworkers, int
 	return;
 	return;
 }
 }
 
 
-void starpu_stop_task_submission()
+void starpu_sched_ctx_stop_task_submission()
 {
 {
 	_starpu_exclude_task_from_dag(&stop_submission_task);
 	_starpu_exclude_task_from_dag(&stop_submission_task);
 	_starpu_task_submit_internally(&stop_submission_task);
 	_starpu_task_submit_internally(&stop_submission_task);
@@ -442,7 +442,7 @@ unsigned starpu_sched_ctx_create(const char *policy_name, int *workerids,
 }
 }
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
-void starpu_set_perf_counters(unsigned sched_ctx_id, struct starpu_performance_counters *perf_counters)
+void starpu_sched_ctx_set_perf_counters(unsigned sched_ctx_id, struct starpu_sched_ctx_performance_counters *perf_counters)
 {
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	sched_ctx->perf_counters = perf_counters;
 	sched_ctx->perf_counters = perf_counters;
@@ -751,12 +751,12 @@ void _starpu_increment_nsubmitted_tasks_of_sched_ctx(unsigned sched_ctx_id)
 	_starpu_barrier_counter_increment(&sched_ctx->tasks_barrier);
 	_starpu_barrier_counter_increment(&sched_ctx->tasks_barrier);
 }
 }
 
 
-void starpu_task_set_context(unsigned *sched_ctx)
+void starpu_sched_ctx_set_task_context(unsigned *sched_ctx)
 {
 {
 	pthread_setspecific(sched_ctx_key, (void*)sched_ctx);
 	pthread_setspecific(sched_ctx_key, (void*)sched_ctx);
 }
 }
 
 
-unsigned starpu_task_get_context()
+unsigned starpu_sched_ctx_get_task_context()
 {
 {
 	unsigned *sched_ctx = (unsigned*)pthread_getspecific(sched_ctx_key);
 	unsigned *sched_ctx = (unsigned*)pthread_getspecific(sched_ctx_key);
 	if(sched_ctx == NULL)
 	if(sched_ctx == NULL)
@@ -765,12 +765,12 @@ unsigned starpu_task_get_context()
 	return *sched_ctx;
 	return *sched_ctx;
 }
 }
 
 
-void starpu_notify_hypervisor_exists()
+void starpu_sched_ctx_notify_hypervisor_exists()
 {
 {
 	with_hypervisor = 1;
 	with_hypervisor = 1;
 }
 }
 
 
-unsigned starpu_check_if_hypervisor_exists()
+unsigned starpu_sched_ctx_check_if_hypervisor_exists()
 {
 {
 	return with_hypervisor;
 	return with_hypervisor;
 }
 }
@@ -800,7 +800,7 @@ struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_create_worker_collec
 
 
 	switch(worker_collection_type)
 	switch(worker_collection_type)
 	{
 	{
-	case STARPU_WORKER_LIST:
+	case STARPU_SCHED_CTX_WORKER_LIST:
 		sched_ctx->workers->has_next = worker_list.has_next;
 		sched_ctx->workers->has_next = worker_list.has_next;
 		sched_ctx->workers->get_next = worker_list.get_next;
 		sched_ctx->workers->get_next = worker_list.get_next;
 		sched_ctx->workers->add = worker_list.add;
 		sched_ctx->workers->add = worker_list.add;
@@ -808,7 +808,7 @@ struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_create_worker_collec
 		sched_ctx->workers->init = worker_list.init;
 		sched_ctx->workers->init = worker_list.init;
 		sched_ctx->workers->deinit = worker_list.deinit;
 		sched_ctx->workers->deinit = worker_list.deinit;
 		sched_ctx->workers->init_iterator = worker_list.init_iterator;
 		sched_ctx->workers->init_iterator = worker_list.init_iterator;
-		sched_ctx->workers->type = STARPU_WORKER_LIST;
+		sched_ctx->workers->type = STARPU_SCHED_CTX_WORKER_LIST;
 		break;
 		break;
 	}
 	}
 
 
@@ -821,7 +821,7 @@ static unsigned _get_workers_list(struct _starpu_sched_ctx *sched_ctx, int **wor
 	*workerids = (int*)malloc(workers->nworkers*sizeof(int));
 	*workerids = (int*)malloc(workers->nworkers*sizeof(int));
 	int worker;
 	int worker;
 	unsigned nworkers = 0;
 	unsigned nworkers = 0;
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -854,7 +854,7 @@ int starpu_get_workers_of_sched_ctx(unsigned sched_ctx_id, int *pus, enum starpu
 	int worker;
 	int worker;
 
 
 	int npus = 0;
 	int npus = 0;
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -869,7 +869,7 @@ int starpu_get_workers_of_sched_ctx(unsigned sched_ctx_id, int *pus, enum starpu
 	return npus;
 	return npus;
 }
 }
 
 
-_starpu_pthread_mutex_t* starpu_get_changing_ctx_mutex(unsigned sched_ctx_id)
+_starpu_pthread_mutex_t* starpu_sched_ctx_get_changing_ctx_mutex(unsigned sched_ctx_id)
 {
 {
 	return &changing_ctx_mutex[sched_ctx_id];
 	return &changing_ctx_mutex[sched_ctx_id];
 }
 }
@@ -894,7 +894,7 @@ unsigned starpu_sched_ctx_get_nshared_workers(unsigned sched_ctx_id, unsigned sc
         int worker, worker2;
         int worker, worker2;
         int shared_workers = 0;
         int shared_workers = 0;
 
 
-	struct starpu_iterator it1, it2;
+	struct starpu_sched_ctx_iterator it1, it2;
         if(workers->init_iterator)
         if(workers->init_iterator)
                 workers->init_iterator(workers, &it1);
                 workers->init_iterator(workers, &it1);
 
 
@@ -929,7 +929,7 @@ unsigned starpu_sched_ctx_contains_worker(int workerid, unsigned sched_ctx_id)
         struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
         struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
         int worker;
         int worker;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
         if(workers->init_iterator)
         if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -966,7 +966,7 @@ unsigned starpu_sched_ctx_overlapping_ctxs_on_worker(int workerid)
 	return worker->nsched_ctxs > 1;
 	return worker->nsched_ctxs > 1;
 }
 }
 
 
-unsigned starpu_is_ctxs_turn(int workerid, unsigned sched_ctx_id)
+unsigned starpu_sched_ctx_is_ctxs_turn(int workerid, unsigned sched_ctx_id)
 {
 {
 	if(max_time_worker_on_ctx == -1.0) return 1;
 	if(max_time_worker_on_ctx == -1.0) return 1;
 
 
@@ -974,7 +974,7 @@ unsigned starpu_is_ctxs_turn(int workerid, unsigned sched_ctx_id)
 	return worker->active_ctx == sched_ctx_id;
 	return worker->active_ctx == sched_ctx_id;
 }
 }
 
 
-void starpu_set_turn_to_other_ctx(int workerid, unsigned sched_ctx_id)
+void starpu_sched_ctx_set_turn_to_other_ctx(int workerid, unsigned sched_ctx_id)
 {
 {
 	struct _starpu_worker *worker = _starpu_get_worker_struct(workerid);
 	struct _starpu_worker *worker = _starpu_get_worker_struct(workerid);
 
 
@@ -999,7 +999,7 @@ void starpu_set_turn_to_other_ctx(int workerid, unsigned sched_ctx_id)
 	}
 	}
 }
 }
 
 
-double starpu_get_max_time_worker_on_ctx(void)
+double starpu_sched_ctx_get_max_time_worker_on_ctx(void)
 {
 {
 	return max_time_worker_on_ctx;
 	return max_time_worker_on_ctx;
 }
 }
@@ -1023,7 +1023,7 @@ void starpu_sched_ctx_finished_submit(unsigned sched_ctx_id)
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 
 
-void starpu_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops, size_t data_size)
+void starpu_sched_ctx_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops, size_t data_size)
 {
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	if(sched_ctx != NULL && sched_ctx_id != 0 && sched_ctx_id != STARPU_NMAX_SCHED_CTXS
 	if(sched_ctx != NULL && sched_ctx_id != 0 && sched_ctx_id != STARPU_NMAX_SCHED_CTXS
@@ -1031,7 +1031,7 @@ void starpu_call_poped_task_cb(int workerid, unsigned sched_ctx_id, double flops
 		sched_ctx->perf_counters->notify_poped_task(sched_ctx_id, workerid, flops, data_size);
 		sched_ctx->perf_counters->notify_poped_task(sched_ctx_id, workerid, flops, data_size);
 }
 }
 
 
-void starpu_call_pushed_task_cb(int workerid, unsigned sched_ctx_id)
+void starpu_sched_ctx_call_pushed_task_cb(int workerid, unsigned sched_ctx_id)
 {
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 
 

+ 2 - 2
src/core/sched_ctx.h

@@ -91,7 +91,7 @@ struct _starpu_sched_ctx
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 	/* a structure containing a series of performance counters determining the resize procedure */
 	/* a structure containing a series of performance counters determining the resize procedure */
-	struct starpu_performance_counters *perf_counters;
+	struct starpu_sched_ctx_performance_counters *perf_counters;
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 };
 };
 
 
@@ -139,7 +139,7 @@ void _starpu_worker_gets_out_of_ctx(unsigned sched_ctx_id, struct _starpu_worker
 unsigned _starpu_worker_belongs_to_a_sched_ctx(int workerid, unsigned sched_ctx_id);
 unsigned _starpu_worker_belongs_to_a_sched_ctx(int workerid, unsigned sched_ctx_id);
 
 
 #if defined(_MSC_VER) || defined(STARPU_SIMGRID)
 #if defined(_MSC_VER) || defined(STARPU_SIMGRID)
-_starpu_pthread_mutex_t* starpu_get_changing_ctx_mutex(unsigned sched_ctx_id);
+_starpu_pthread_mutex_t* starpu_sched_ctx_get_changing_ctx_mutex(unsigned sched_ctx_id);
 #endif
 #endif
 
 
 #endif // __SCHED_CONTEXT_H__
 #endif // __SCHED_CONTEXT_H__

+ 4 - 4
src/core/sched_policy.c

@@ -225,7 +225,7 @@ static int _starpu_push_task_on_specific_worker(struct starpu_task *task, int wo
 	}
 	}
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
-	starpu_call_pushed_task_cb(workerid, task->sched_ctx);
+	starpu_sched_ctx_call_pushed_task_cb(workerid, task->sched_ctx);
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 
 
 	if (is_basic_worker)
 	if (is_basic_worker)
@@ -298,14 +298,14 @@ static int _starpu_nworkers_able_to_execute_task(struct starpu_task *task, struc
 	int worker = -1, nworkers = 0;
 	int worker = -1, nworkers = 0;
 	struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
 	struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
 	while(workers->has_next(workers, &it))
 	while(workers->has_next(workers, &it))
 	{
 	{
 		worker = workers->get_next(workers, &it);
 		worker = workers->get_next(workers, &it);
-		if (starpu_worker_can_execute_task(worker, task, 0) && starpu_is_ctxs_turn(worker, sched_ctx->id))
+		if (starpu_worker_can_execute_task(worker, task, 0) && starpu_sched_ctx_is_ctxs_turn(worker, sched_ctx->id))
 			nworkers++;
 			nworkers++;
 	}
 	}
 
 
@@ -604,7 +604,7 @@ pick:
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 	struct _starpu_sched_ctx *sched_ctx = NULL;
 	struct _starpu_sched_ctx *sched_ctx = NULL;
-	struct starpu_performance_counters *perf_counters = NULL;
+	struct starpu_sched_ctx_performance_counters *perf_counters = NULL;
 	int j;
 	int j;
 	for(j = 0; j < STARPU_NMAX_SCHED_CTXS; j++)
 	for(j = 0; j < STARPU_NMAX_SCHED_CTXS; j++)
 	{
 	{

+ 2 - 2
src/core/task.c

@@ -365,7 +365,7 @@ int starpu_task_submit(struct starpu_task *task)
 
 
 	if (task->sched_ctx == 0 && nsched_ctxs != 1 && !j->exclude_from_dag)
 	if (task->sched_ctx == 0 && nsched_ctxs != 1 && !j->exclude_from_dag)
 	{
 	{
-		set_sched_ctx = starpu_task_get_context();
+		set_sched_ctx = starpu_sched_ctx_get_task_context();
 		if (set_sched_ctx != STARPU_NMAX_SCHED_CTXS)
 		if (set_sched_ctx != STARPU_NMAX_SCHED_CTXS)
 			task->sched_ctx = set_sched_ctx;
 			task->sched_ctx = set_sched_ctx;
 	}
 	}
@@ -633,7 +633,7 @@ void starpu_display_codelet_stats(struct starpu_codelet *cl)
 int starpu_task_wait_for_all(void)
 int starpu_task_wait_for_all(void)
 {
 {
 	unsigned nsched_ctxs = _starpu_get_nsched_ctxs();
 	unsigned nsched_ctxs = _starpu_get_nsched_ctxs();
-	unsigned sched_ctx_id = nsched_ctxs == 1 ? 0 : starpu_task_get_context();
+	unsigned sched_ctx_id = nsched_ctxs == 1 ? 0 : starpu_sched_ctx_get_task_context();
 
 
 	/* if there is no indication about which context to wait,
 	/* if there is no indication about which context to wait,
 	   we wait for all tasks submitted to starpu */
 	   we wait for all tasks submitted to starpu */

+ 1 - 1
src/core/workers.c

@@ -1299,7 +1299,7 @@ int starpu_worker_get_nids_ctx_free_by_type(enum starpu_archtype type, int *work
 				if(config.sched_ctxs[s].id != STARPU_NMAX_SCHED_CTXS)
 				if(config.sched_ctxs[s].id != STARPU_NMAX_SCHED_CTXS)
 				{
 				{
 					struct starpu_sched_ctx_worker_collection *workers = config.sched_ctxs[s].workers;
 					struct starpu_sched_ctx_worker_collection *workers = config.sched_ctxs[s].workers;
-					struct starpu_iterator it;
+					struct starpu_sched_ctx_iterator it;
 					if(workers->init_iterator)
 					if(workers->init_iterator)
 						workers->init_iterator(workers, &it);
 						workers->init_iterator(workers, &it);
 
 

+ 8 - 8
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -276,7 +276,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 	starpu_worker_get_sched_condition(best_workerid, &sched_mutex, &sched_cond);
 	starpu_worker_get_sched_condition(best_workerid, &sched_mutex, &sched_cond);
 
 
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
 #ifdef STARPU_USE_SCHED_CTX_HYPERVISOR
-	starpu_call_pushed_task_cb(best_workerid, sched_ctx_id);
+	starpu_sched_ctx_call_pushed_task_cb(best_workerid, sched_ctx_id);
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 #endif //STARPU_USE_SCHED_CTX_HYPERVISOR
 
 
 	_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
 	_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
@@ -377,7 +377,7 @@ static int _dm_push_task(struct starpu_task *task, unsigned prio, unsigned sched
 	unsigned nimpl;
 	unsigned nimpl;
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -498,7 +498,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -626,7 +626,7 @@ static int _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned sch
 
 
 	double fitness[nworkers_ctx][STARPU_MAXIMPLEMENTATIONS];
 	double fitness[nworkers_ctx][STARPU_MAXIMPLEMENTATIONS];
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 
 
@@ -723,7 +723,7 @@ static int dmda_push_sorted_task(struct starpu_task *task)
 #warning TODO: after defining a scheduling window, use that instead of empty_ctx_tasks
 #warning TODO: after defining a scheduling window, use that instead of empty_ctx_tasks
 #endif
 #endif
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 
 
@@ -744,7 +744,7 @@ static int dmda_push_sorted_task(struct starpu_task *task)
 static int dm_push_task(struct starpu_task *task)
 static int dm_push_task(struct starpu_task *task)
 {
 {
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 
 
@@ -764,7 +764,7 @@ static int dm_push_task(struct starpu_task *task)
 static int dmda_push_task(struct starpu_task *task)
 static int dmda_push_task(struct starpu_task *task)
 {
 {
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 
 
@@ -817,7 +817,7 @@ static void dmda_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned
 
 
 static void initialize_dmda_policy(unsigned sched_ctx_id)
 static void initialize_dmda_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 
 
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)malloc(sizeof(struct _starpu_dmda_data));
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)malloc(sizeof(struct _starpu_dmda_data));
 	dt->alpha = _STARPU_DEFAULT_ALPHA;
 	dt->alpha = _STARPU_DEFAULT_ALPHA;

+ 4 - 4
src/sched_policies/detect_combined_workers.c

@@ -82,7 +82,7 @@ static void synthesize_intermediate_workers(hwloc_obj_t *children, unsigned min,
 		{
 		{
 			if (nworkers >= min && nworkers <= max)
 			if (nworkers >= min && nworkers <= max)
 			{
 			{
-				unsigned sched_ctx_id  = starpu_task_get_context();
+				unsigned sched_ctx_id  = starpu_sched_ctx_get_task_context();
 				if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 				if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 					sched_ctx_id = 0;
 					sched_ctx_id = 0;
 				struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 				struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
@@ -134,7 +134,7 @@ static void find_and_assign_combinations(hwloc_obj_t obj, unsigned min, unsigned
 	if (nworkers >= min && nworkers <= max)
 	if (nworkers >= min && nworkers <= max)
 	{
 	{
 		_STARPU_DEBUG("Adding it\n");
 		_STARPU_DEBUG("Adding it\n");
-		unsigned sched_ctx_id  = starpu_task_get_context();
+		unsigned sched_ctx_id  = starpu_sched_ctx_get_task_context();
 		if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 		if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 			sched_ctx_id = 0;
 			sched_ctx_id = 0;
 
 
@@ -194,7 +194,7 @@ static void find_and_assign_combinations_with_hwloc(int *workerids, int nworkers
 
 
 static void find_and_assign_combinations_without_hwloc(int *workerids, int nworkers)
 static void find_and_assign_combinations_without_hwloc(int *workerids, int nworkers)
 {
 {
-	unsigned sched_ctx_id  = starpu_task_get_context();
+	unsigned sched_ctx_id  = starpu_sched_ctx_get_task_context();
 	if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 	if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 		sched_ctx_id = 0;
 		sched_ctx_id = 0;
 	int min;
 	int min;
@@ -250,7 +250,7 @@ static void find_and_assign_combinations_without_hwloc(int *workerids, int nwork
 
 
 static void combine_all_cpu_workers(int *workerids, int nworkers)
 static void combine_all_cpu_workers(int *workerids, int nworkers)
 {
 {
-	unsigned sched_ctx_id  = starpu_task_get_context();
+	unsigned sched_ctx_id  = starpu_sched_ctx_get_task_context();
 	if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 	if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 		sched_ctx_id = 0;
 		sched_ctx_id = 0;
 	struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);

+ 2 - 2
src/sched_policies/eager_central_policy.c

@@ -32,7 +32,7 @@ struct _starpu_eager_center_policy_data
 
 
 static void initialize_eager_center_policy(unsigned sched_ctx_id)
 static void initialize_eager_center_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 
 
 	struct _starpu_eager_center_policy_data *data = (struct _starpu_eager_center_policy_data*)malloc(sizeof(struct _starpu_eager_center_policy_data));
 	struct _starpu_eager_center_policy_data *data = (struct _starpu_eager_center_policy_data*)malloc(sizeof(struct _starpu_eager_center_policy_data));
 
 
@@ -63,7 +63,7 @@ static int push_task_eager_policy(struct starpu_task *task)
  {
  {
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
 	struct _starpu_eager_center_policy_data *data = (struct _starpu_eager_center_policy_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 	struct _starpu_eager_center_policy_data *data = (struct _starpu_eager_center_policy_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 
 

+ 4 - 4
src/sched_policies/eager_central_priority_policy.c

@@ -76,7 +76,7 @@ static void _starpu_destroy_priority_taskq(struct _starpu_priority_taskq *priori
 
 
 static void initialize_eager_center_priority_policy(unsigned sched_ctx_id)
 static void initialize_eager_center_priority_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 	struct _starpu_eager_central_prio_data *data = (struct _starpu_eager_central_prio_data*)malloc(sizeof(struct _starpu_eager_central_prio_data));
 	struct _starpu_eager_central_prio_data *data = (struct _starpu_eager_central_prio_data*)malloc(sizeof(struct _starpu_eager_central_prio_data));
 
 
 	/* In this policy, we support more than two levels of priority. */
 	/* In this policy, we support more than two levels of priority. */
@@ -110,7 +110,7 @@ static int _starpu_priority_push_task(struct starpu_task *task)
 	struct _starpu_priority_taskq *taskq = data->taskq;
 	struct _starpu_priority_taskq *taskq = data->taskq;
 
 
 	/* if the context has no workers return */
 	/* if the context has no workers return */
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 	
 	
@@ -137,7 +137,7 @@ static int _starpu_priority_push_task(struct starpu_task *task)
 	unsigned worker = 0;
 	unsigned worker = 0;
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	
 	
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 	
 	
@@ -215,7 +215,7 @@ static struct starpu_task *_starpu_priority_pop_task(unsigned sched_ctx_id)
 		unsigned worker = 0;
 		unsigned worker = 0;
 		struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 		struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 
-		struct starpu_iterator it;
+		struct starpu_sched_ctx_iterator it;
 		if(workers->init_iterator)
 		if(workers->init_iterator)
 			workers->init_iterator(workers, &it);
 			workers->init_iterator(workers, &it);
 		
 		

+ 3 - 3
src/sched_policies/parallel_eager.c

@@ -128,7 +128,7 @@ static void peager_remove_workers(unsigned sched_ctx_id, int *workerids, unsigne
 
 
 static void initialize_peager_policy(unsigned sched_ctx_id)
 static void initialize_peager_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 
 
 	struct _starpu_peager_data *data = (struct _starpu_peager_data*)malloc(sizeof(struct _starpu_peager_data));
 	struct _starpu_peager_data *data = (struct _starpu_peager_data*)malloc(sizeof(struct _starpu_peager_data));
 	/* masters pick tasks from that queue */
 	/* masters pick tasks from that queue */
@@ -153,7 +153,7 @@ static void deinitialize_peager_policy(unsigned sched_ctx_id)
 static int push_task_peager_policy(struct starpu_task *task)
 static int push_task_peager_policy(struct starpu_task *task)
 {
 {
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 	
 	
@@ -170,7 +170,7 @@ static int push_task_peager_policy(struct starpu_task *task)
 	int worker = 0;
 	int worker = 0;
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	
 	
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 	
 	

+ 3 - 3
src/sched_policies/parallel_heft.c

@@ -273,7 +273,7 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio, uns
 
 
 	/* A priori, we know all estimations */
 	/* A priori, we know all estimations */
 	int unknown = 0;
 	int unknown = 0;
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -451,7 +451,7 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio, uns
 static int parallel_heft_push_task(struct starpu_task *task)
 static int parallel_heft_push_task(struct starpu_task *task)
 {
 {
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
 	int ret_val = -1;
 	int ret_val = -1;
 
 
@@ -535,7 +535,7 @@ static void parallel_heft_add_workers(unsigned sched_ctx_id, int *workerids, uns
 
 
 static void initialize_parallel_heft_policy(unsigned sched_ctx_id)
 static void initialize_parallel_heft_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 	struct _starpu_pheft_data *hd = (struct _starpu_pheft_data*)malloc(sizeof(struct _starpu_pheft_data));
 	struct _starpu_pheft_data *hd = (struct _starpu_pheft_data*)malloc(sizeof(struct _starpu_pheft_data));
 	hd->alpha = _STARPU_DEFAULT_ALPHA;
 	hd->alpha = _STARPU_DEFAULT_ALPHA;
 	hd->beta = _STARPU_DEFAULT_BETA;
 	hd->beta = _STARPU_DEFAULT_BETA;

+ 3 - 3
src/sched_policies/random_policy.c

@@ -36,7 +36,7 @@ static int _random_push_task(struct starpu_task *task, unsigned prio)
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
         int worker;
         int worker;
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
         if(workers->init_iterator)
         if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -84,7 +84,7 @@ static int _random_push_task(struct starpu_task *task, unsigned prio)
 static int random_push_task(struct starpu_task *task)
 static int random_push_task(struct starpu_task *task)
 {
 {
 	unsigned sched_ctx_id = task->sched_ctx;
 	unsigned sched_ctx_id = task->sched_ctx;
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
 	unsigned nworkers;
 	unsigned nworkers;
         int ret_val = -1;
         int ret_val = -1;
 
 
@@ -103,7 +103,7 @@ static int random_push_task(struct starpu_task *task)
 
 
 static void initialize_random_policy(unsigned sched_ctx_id)
 static void initialize_random_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 	starpu_srand48(time(NULL));
 	starpu_srand48(time(NULL));
 }
 }
 
 

+ 5 - 5
src/sched_policies/work_stealing_policy.c

@@ -148,7 +148,7 @@ static unsigned select_victim_overload(unsigned sched_ctx_id)
 
 
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
         if(workers->init_iterator)
         if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -188,7 +188,7 @@ static unsigned select_worker_overload(unsigned sched_ctx_id)
 
 
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
         if(workers->init_iterator)
         if(workers->init_iterator)
                 workers->init_iterator(workers, &it);
                 workers->init_iterator(workers, &it);
 
 
@@ -321,7 +321,7 @@ int ws_push_task(struct starpu_task *task)
 	struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
 	struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
 	int workerid = starpu_worker_get_id();
 	int workerid = starpu_worker_get_id();
 
 
-	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_get_changing_ctx_mutex(sched_ctx_id);
+	_starpu_pthread_mutex_t *changing_ctx_mutex = starpu_sched_ctx_get_changing_ctx_mutex(sched_ctx_id);
         unsigned nworkers;
         unsigned nworkers;
         int ret_val = -1;
         int ret_val = -1;
 
 
@@ -336,7 +336,7 @@ int ws_push_task(struct starpu_task *task)
 
 
 	unsigned worker = 0;
 	unsigned worker = 0;
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
-	struct starpu_iterator it;
+	struct starpu_sched_ctx_iterator it;
 	if(workers->init_iterator)
 	if(workers->init_iterator)
 		workers->init_iterator(workers, &it);
 		workers->init_iterator(workers, &it);
 	
 	
@@ -420,7 +420,7 @@ static void ws_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned nw
 
 
 static void initialize_ws_policy(unsigned sched_ctx_id)
 static void initialize_ws_policy(unsigned sched_ctx_id)
 {
 {
-	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, STARPU_SCHED_CTX_WORKER_LIST);
 
 
 	struct _starpu_work_stealing_data *ws = (struct _starpu_work_stealing_data*)malloc(sizeof(struct _starpu_work_stealing_data));
 	struct _starpu_work_stealing_data *ws = (struct _starpu_work_stealing_data*)malloc(sizeof(struct _starpu_work_stealing_data));
 	starpu_sched_ctx_set_policy_data(sched_ctx_id, (void*)ws);
 	starpu_sched_ctx_set_policy_data(sched_ctx_id, (void*)ws);

+ 4 - 4
src/worker_collection/worker_list.c

@@ -19,7 +19,7 @@
 #include <starpu.h>
 #include <starpu.h>
 #include <pthread.h>
 #include <pthread.h>
 
 
-static unsigned list_has_next(struct starpu_sched_ctx_worker_collection *workers, struct starpu_iterator *it)
+static unsigned list_has_next(struct starpu_sched_ctx_worker_collection *workers, struct starpu_sched_ctx_iterator *it)
 {
 {
 	int nworkers = (int)workers->nworkers;
 	int nworkers = (int)workers->nworkers;
 	STARPU_ASSERT(it != NULL);
 	STARPU_ASSERT(it != NULL);
@@ -31,7 +31,7 @@ static unsigned list_has_next(struct starpu_sched_ctx_worker_collection *workers
 	return ret;
 	return ret;
 }
 }
 
 
-static int list_get_next(struct starpu_sched_ctx_worker_collection *workers, struct starpu_iterator *it)
+static int list_get_next(struct starpu_sched_ctx_worker_collection *workers, struct starpu_sched_ctx_iterator *it)
 {
 {
 	int *workerids = (int *)workers->workerids;
 	int *workerids = (int *)workers->workerids;
 	int nworkers = (int)workers->nworkers;
 	int nworkers = (int)workers->nworkers;
@@ -153,7 +153,7 @@ static void list_deinit(struct starpu_sched_ctx_worker_collection *workers)
 	free(workers->workerids);
 	free(workers->workerids);
 }
 }
 
 
-static void list_init_iterator(struct starpu_sched_ctx_worker_collection *workers STARPU_ATTRIBUTE_UNUSED, struct starpu_iterator *it)
+static void list_init_iterator(struct starpu_sched_ctx_worker_collection *workers STARPU_ATTRIBUTE_UNUSED, struct starpu_sched_ctx_iterator *it)
 {
 {
 	*((int*)it) = 0;
 	*((int*)it) = 0;
 }
 }
@@ -167,6 +167,6 @@ struct starpu_sched_ctx_worker_collection worker_list =
 	.init = list_init,
 	.init = list_init,
 	.deinit = list_deinit,
 	.deinit = list_deinit,
 	.init_iterator = list_init_iterator,
 	.init_iterator = list_init_iterator,
-	.type = STARPU_WORKER_LIST
+	.type = STARPU_SCHED_CTX_WORKER_LIST
 };
 };