Переглянути джерело

Prefixing of src/core/mechanisms/queues.h

find . -type f -not -name "*svn*"|xargs sed -i s/"\bjobq_s\b"/starpu_jobq_s/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bsetup_queues\b"/_starpu_setup_queues/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bget_local_queue\b"/_starpu_get_local_queue/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bset_local_queue\b"/_starpu_set_local_queue/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjobq_lock\b"/_starpu_jobq_lock/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjobq_unlock\b"/_starpu_jobq_unlock/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjobq_trylock\b"/_starpu_jobq_trylock/g
Nathalie Furmento 15 роки тому
батько
коміт
6670f6e08d

+ 9 - 9
src/core/mechanisms/deque_queues.c

@@ -36,10 +36,10 @@ void _starpu_init_deque_queues_mechanisms(void)
 	sched_mutex = &sched->sched_activity_mutex;
 }
 
-struct jobq_s *_starpu_create_deque(void)
+struct starpu_jobq_s *_starpu_create_deque(void)
 {
-	struct jobq_s *jobq;
-	jobq = malloc(sizeof(struct jobq_s));
+	struct starpu_jobq_s *jobq;
+	jobq = malloc(sizeof(struct starpu_jobq_s));
 
 	pthread_mutex_init(&jobq->activity_mutex, NULL);
 	pthread_cond_init(&jobq->activity_cond, NULL);
@@ -66,7 +66,7 @@ unsigned _starpu_get_total_njobs_deques(void)
 	return total_number_of_jobs;
 }
 
-unsigned _starpu_get_deque_njobs(struct jobq_s *q)
+unsigned _starpu_get_deque_njobs(struct starpu_jobq_s *q)
 {
 	STARPU_ASSERT(q);
 
@@ -75,7 +75,7 @@ unsigned _starpu_get_deque_njobs(struct jobq_s *q)
 	return deque_queue->njobs;
 }
 
-unsigned _starpu_get_deque_nprocessed(struct jobq_s *q)
+unsigned _starpu_get_deque_nprocessed(struct starpu_jobq_s *q)
 {
 	STARPU_ASSERT(q);
 
@@ -84,12 +84,12 @@ unsigned _starpu_get_deque_nprocessed(struct jobq_s *q)
 	return deque_queue->nprocessed;
 }
 
-int _starpu_deque_push_prio_task(struct jobq_s *q, starpu_job_t task)
+int _starpu_deque_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 	return _starpu_deque_push_task(q, task);
 }
 
-int _starpu_deque_push_task(struct jobq_s *q, starpu_job_t task)
+int _starpu_deque_push_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 	STARPU_ASSERT(q);
 	struct starpu_deque_jobq_s *deque_queue = q->queue;
@@ -114,7 +114,7 @@ int _starpu_deque_push_task(struct jobq_s *q, starpu_job_t task)
 	return 0;
 }
 
-starpu_job_t _starpu_deque_pop_task(struct jobq_s *q)
+starpu_job_t _starpu_deque_pop_task(struct starpu_jobq_s *q)
 {
 	starpu_job_t j = NULL;
 
@@ -146,7 +146,7 @@ starpu_job_t _starpu_deque_pop_task(struct jobq_s *q)
 	return j;
 }
 
-struct starpu_job_list_s * deque_pop_every_task(struct jobq_s *q, uint32_t where)
+struct starpu_job_list_s * deque_pop_every_task(struct starpu_jobq_s *q, uint32_t where)
 {
 	struct starpu_job_list_s *new_list, *old_list;
 

+ 6 - 6
src/core/mechanisms/deque_queues.h

@@ -35,19 +35,19 @@ struct starpu_deque_jobq_s {
 	double exp_len;
 };
 
-struct jobq_s *_starpu_create_deque(void);
+struct starpu_jobq_s *_starpu_create_deque(void);
 
-int _starpu_deque_push_task(struct jobq_s *q, starpu_job_t task);
-int _starpu_deque_push_prio_task(struct jobq_s *q, starpu_job_t task);
+int _starpu_deque_push_task(struct starpu_jobq_s *q, starpu_job_t task);
+int _starpu_deque_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task);
 
-starpu_job_t _starpu_deque_pop_task(struct jobq_s *q);
+starpu_job_t _starpu_deque_pop_task(struct starpu_jobq_s *q);
 
 void _starpu_init_deque_queues_mechanisms(void);
 
 unsigned _starpu_get_total_njobs_deques(void);
 
-unsigned _starpu_get_deque_njobs(struct jobq_s *q);
-unsigned _starpu_get_deque_nprocessed(struct jobq_s *q);
+unsigned _starpu_get_deque_njobs(struct starpu_jobq_s *q);
+unsigned _starpu_get_deque_nprocessed(struct starpu_jobq_s *q);
 
 
 #endif // __DEQUE_QUEUES_H__

+ 7 - 7
src/core/mechanisms/fifo_queues.c

@@ -36,10 +36,10 @@ void _starpu_init_fifo_queues_mechanisms(void)
 	sched_mutex = &sched->sched_activity_mutex;
 }
 
-struct jobq_s *_starpu_create_fifo(void)
+struct starpu_jobq_s *_starpu_create_fifo(void)
 {
-	struct jobq_s *jobq;
-	jobq = malloc(sizeof(struct jobq_s));
+	struct starpu_jobq_s *jobq;
+	jobq = malloc(sizeof(struct starpu_jobq_s));
 
 	pthread_mutex_init(&jobq->activity_mutex, NULL);
 	pthread_cond_init(&jobq->activity_cond, NULL);
@@ -61,7 +61,7 @@ struct jobq_s *_starpu_create_fifo(void)
 	return jobq;
 }
 
-int _starpu_fifo_push_prio_task(struct jobq_s *q, starpu_job_t task)
+int _starpu_fifo_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 #ifndef STARPU_NO_PRIO
 	STARPU_ASSERT(q);
@@ -90,7 +90,7 @@ int _starpu_fifo_push_prio_task(struct jobq_s *q, starpu_job_t task)
 #endif
 }
 
-int _starpu_fifo_push_task(struct jobq_s *q, starpu_job_t task)
+int _starpu_fifo_push_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 	STARPU_ASSERT(q);
 	struct starpu_fifo_jobq_s *fifo_queue = q->queue;
@@ -115,7 +115,7 @@ int _starpu_fifo_push_task(struct jobq_s *q, starpu_job_t task)
 	return 0;
 }
 
-starpu_job_t _starpu_fifo_pop_task(struct jobq_s *q)
+starpu_job_t _starpu_fifo_pop_task(struct starpu_jobq_s *q)
 {
 	starpu_job_t j = NULL;
 
@@ -146,7 +146,7 @@ starpu_job_t _starpu_fifo_pop_task(struct jobq_s *q)
 }
 
 /* pop every task that can be executed on the calling driver */
-struct starpu_job_list_s * _starpu_fifo_pop_every_task(struct jobq_s *q, uint32_t where)
+struct starpu_job_list_s * _starpu_fifo_pop_every_task(struct starpu_jobq_s *q, uint32_t where)
 {
 	struct starpu_job_list_s *new_list, *old_list;
 	unsigned size;

+ 5 - 5
src/core/mechanisms/fifo_queues.h

@@ -35,13 +35,13 @@ struct starpu_fifo_jobq_s {
 	double exp_len;
 };
 
-struct jobq_s *_starpu_create_fifo(void);
+struct starpu_jobq_s *_starpu_create_fifo(void);
 
-int _starpu_fifo_push_task(struct jobq_s *q, starpu_job_t task);
-int _starpu_fifo_push_prio_task(struct jobq_s *q, starpu_job_t task);
+int _starpu_fifo_push_task(struct starpu_jobq_s *q, starpu_job_t task);
+int _starpu_fifo_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task);
 
-starpu_job_t _starpu_fifo_pop_task(struct jobq_s *q);
-struct starpu_job_list_s * _starpu_fifo_pop_every_task(struct jobq_s *q, uint32_t where);
+starpu_job_t _starpu_fifo_pop_task(struct starpu_jobq_s *q);
+struct starpu_job_list_s * _starpu_fifo_pop_every_task(struct starpu_jobq_s *q, uint32_t where);
 
 void _starpu_init_fifo_queues_mechanisms(void);
 

+ 5 - 5
src/core/mechanisms/priority_queues.c

@@ -37,11 +37,11 @@ void _starpu_init_priority_queues_mechanisms(void)
 	sched_mutex = &sched->sched_activity_mutex;
 }
 
-struct jobq_s *_starpu_create_priority_jobq(void)
+struct starpu_jobq_s *_starpu_create_priority_jobq(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
-	q = malloc(sizeof(struct jobq_s));
+	q = malloc(sizeof(struct starpu_jobq_s));
 
 	struct starpu_priority_jobq_s *central_queue;
 	
@@ -63,7 +63,7 @@ struct jobq_s *_starpu_create_priority_jobq(void)
 	return q;
 }
 
-int _starpu_priority_push_task(struct jobq_s *q, starpu_job_t j)
+int _starpu_priority_push_task(struct starpu_jobq_s *q, starpu_job_t j)
 {
 	STARPU_ASSERT(q);
 	struct starpu_priority_jobq_s *queue = q->queue;
@@ -90,7 +90,7 @@ int _starpu_priority_push_task(struct jobq_s *q, starpu_job_t j)
 	return 0;
 }
 
-starpu_job_t _starpu_priority_pop_task(struct jobq_s *q)
+starpu_job_t _starpu_priority_pop_task(struct starpu_jobq_s *q)
 {
 	starpu_job_t j = NULL;
 

+ 3 - 3
src/core/mechanisms/priority_queues.h

@@ -32,11 +32,11 @@ struct starpu_priority_jobq_s {
 	unsigned total_njobs;
 };
 
-struct jobq_s *_starpu_create_priority_jobq(void);
+struct starpu_jobq_s *_starpu_create_priority_jobq(void);
 void _starpu_init_priority_queues_mechanisms(void);
 
-int _starpu_priority_push_task(struct jobq_s *q, starpu_job_t task);
+int _starpu_priority_push_task(struct starpu_jobq_s *q, starpu_job_t task);
 
-starpu_job_t _starpu_priority_pop_task(struct jobq_s *q);
+starpu_job_t _starpu_priority_pop_task(struct starpu_jobq_s *q);
 
 #endif // __PRIORITY_QUEUES_H__

+ 7 - 7
src/core/mechanisms/queues.c

@@ -23,8 +23,8 @@
  * 	- hierarchical (marcel-like)
  */
 
-void setup_queues(void (*init_queue_design)(void),
-		  struct jobq_s *(*func_init_queue)(void), 
+void _starpu_setup_queues(void (*init_queue_design)(void),
+		  struct starpu_jobq_s *(*func_init_queue)(void), 
 		  struct starpu_machine_config_s *config) 
 {
 	unsigned worker;
@@ -40,7 +40,7 @@ void setup_queues(void (*init_queue_design)(void),
 }
 
 /* this may return NULL for an "anonymous thread" */
-struct jobq_s *get_local_queue(void)
+struct starpu_jobq_s *_starpu_get_local_queue(void)
 {
 	struct starpu_sched_policy_s *policy = _starpu_get_sched_policy();
 
@@ -48,24 +48,24 @@ struct jobq_s *get_local_queue(void)
 }
 
 /* XXX how to retrieve policy ? that may be given in the machine config ? */
-void set_local_queue(struct jobq_s *jobq)
+void _starpu_set_local_queue(struct starpu_jobq_s *jobq)
 {
 	struct starpu_sched_policy_s *policy = _starpu_get_sched_policy();
 
 	pthread_setspecific(policy->local_queue_key, jobq);
 }
 
-void jobq_lock(struct jobq_s *jobq)
+void _starpu_jobq_lock(struct starpu_jobq_s *jobq)
 {
 	pthread_mutex_lock(&jobq->activity_mutex);	
 }
 
-void jobq_unlock(struct jobq_s *jobq)
+void _starpu_jobq_unlock(struct starpu_jobq_s *jobq)
 {
 	pthread_mutex_unlock(&jobq->activity_mutex);	
 }
 
-int jobq_trylock(struct jobq_s *jobq)
+int _starpu_jobq_trylock(struct starpu_jobq_s *jobq)
 {
 	return pthread_mutex_trylock(&jobq->activity_mutex);	
 }

+ 12 - 12
src/core/mechanisms/queues.h

@@ -24,14 +24,14 @@
 
 enum starpu_perf_archtype;
 
-struct jobq_s {
+struct starpu_jobq_s {
 	/* a pointer to some queue structure */
 	void *queue; 
 
 	/* some methods to manipulate the previous queue */
-	int (*_starpu_push_task)(struct jobq_s *, starpu_job_t);
-	int (*push_prio_task)(struct jobq_s *, starpu_job_t);
-	struct starpu_job_s* (*_starpu_pop_task)(struct jobq_s *);
+	int (*_starpu_push_task)(struct starpu_jobq_s *, starpu_job_t);
+	int (*push_prio_task)(struct starpu_jobq_s *, starpu_job_t);
+	struct starpu_job_s* (*_starpu_pop_task)(struct starpu_jobq_s *);
 
 	/* returns the number of tasks that were retrieved 
  	 * the function is reponsible for allocating the output but the driver
@@ -39,7 +39,7 @@ struct jobq_s {
  	 *
  	 * NB : this function is non blocking
  	 * */
-	struct starpu_job_list_s *(*_starpu_pop_every_task)(struct jobq_s *, uint32_t);
+	struct starpu_job_list_s *(*_starpu_pop_every_task)(struct starpu_jobq_s *, uint32_t);
 
 	/* what are the driver that may pop job from that queue ? */
 	uint32_t who;
@@ -63,15 +63,15 @@ struct jobq_s {
 
 struct starpu_machine_config_s;
 
-void setup_queues(void (*init_queue_design)(void),
-                  struct jobq_s *(*func_init_queue)(void),
+void _starpu_setup_queues(void (*init_queue_design)(void),
+                  struct starpu_jobq_s *(*func_init_queue)(void),
                   struct starpu_machine_config_s *config);
 
-struct jobq_s *get_local_queue(void);
-void set_local_queue(struct jobq_s *jobq);
+struct starpu_jobq_s *_starpu_get_local_queue(void);
+void _starpu_set_local_queue(struct starpu_jobq_s *jobq);
 
-void jobq_lock(struct jobq_s *jobq);
-void jobq_unlock(struct jobq_s *jobq);
-int jobq_trylock(struct jobq_s *jobq);
+void _starpu_jobq_lock(struct starpu_jobq_s *jobq);
+void _starpu_jobq_unlock(struct starpu_jobq_s *jobq);
+int _starpu_jobq_trylock(struct starpu_jobq_s *jobq);
 
 #endif // __QUEUES_H__

+ 8 - 8
src/core/mechanisms/stack_queues.c

@@ -36,10 +36,10 @@ void init_stack_queues_mechanisms(void)
 	sched_mutex = &sched->sched_activity_mutex;
 }
 
-struct jobq_s *create_stack(void)
+struct starpu_jobq_s *create_stack(void)
 {
-	struct jobq_s *jobq;
-	jobq = malloc(sizeof(struct jobq_s));
+	struct starpu_jobq_s *jobq;
+	jobq = malloc(sizeof(struct starpu_jobq_s));
 
 	struct stack_jobq_s *stack;
 	stack = malloc(sizeof(struct stack_jobq_s));
@@ -66,7 +66,7 @@ unsigned get_total_njobs_stacks(void)
 	return total_number_of_jobs;
 }
 
-unsigned get_stack_njobs(struct jobq_s *q)
+unsigned get_stack_njobs(struct starpu_jobq_s *q)
 {
 	STARPU_ASSERT(q);
 
@@ -75,7 +75,7 @@ unsigned get_stack_njobs(struct jobq_s *q)
 	return stack_queue->njobs;
 }
 
-unsigned get_stack_nprocessed(struct jobq_s *q)
+unsigned get_stack_nprocessed(struct starpu_jobq_s *q)
 {
 	STARPU_ASSERT(q);
 
@@ -84,7 +84,7 @@ unsigned get_stack_nprocessed(struct jobq_s *q)
 	return stack_queue->nprocessed;
 }
 
-void stack_push_prio_task(struct jobq_s *q, starpu_job_t task)
+void stack_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 #ifndef STARPU_NO_PRIO
 	STARPU_ASSERT(q);
@@ -111,7 +111,7 @@ void stack_push_prio_task(struct jobq_s *q, starpu_job_t task)
 #endif
 }
 
-void stack_push_task(struct jobq_s *q, starpu_job_t task)
+void stack_push_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 	STARPU_ASSERT(q);
 	struct stack_jobq_s *stack_queue = q->queue;
@@ -134,7 +134,7 @@ void stack_push_task(struct jobq_s *q, starpu_job_t task)
 	pthread_mutex_unlock(&q->activity_mutex);
 }
 
-starpu_job_t stack_pop_task(struct jobq_s *q)
+starpu_job_t stack_pop_task(struct starpu_jobq_s *q)
 {
 	starpu_job_t j = NULL;
 

+ 6 - 6
src/core/mechanisms/stack_queues.h

@@ -35,19 +35,19 @@ struct stack_jobq_s {
 	double exp_len;
 };
 
-struct jobq_s *create_stack(void);
+struct starpu_jobq_s *create_stack(void);
 
-void stack_push_task(struct jobq_s *q, starpu_job_t task);
+void stack_push_task(struct starpu_jobq_s *q, starpu_job_t task);
 
-void stack_push_prio_task(struct jobq_s *q, starpu_job_t task);
+void stack_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task);
 
-starpu_job_t stack_pop_task(struct jobq_s *q);
+starpu_job_t stack_pop_task(struct starpu_jobq_s *q);
 
 void init_stack_queues_mechanisms(void);
 
 
-unsigned get_stack_njobs(struct jobq_s *q);
-unsigned get_stack_nprocessed(struct jobq_s *q);
+unsigned get_stack_njobs(struct starpu_jobq_s *q);
+unsigned get_stack_nprocessed(struct starpu_jobq_s *q);
 
 
 #endif // __STACK_QUEUES_H__

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

@@ -115,7 +115,7 @@ double _starpu_job_expected_length(uint32_t who, struct starpu_job_s *j, enum st
 }
 
 /* Data transfer performance modeling */
-double _starpu_data_expected_penalty(struct jobq_s *q, struct starpu_task *task)
+double _starpu_data_expected_penalty(struct starpu_jobq_s *q, struct starpu_task *task)
 {
 	uint32_t memory_node = q->memory_node;
 	unsigned nbuffers = task->cl->nbuffers;

+ 2 - 2
src/core/perfmodel/perfmodel.h

@@ -27,7 +27,7 @@
 #include <stdio.h>
 
 struct starpu_buffer_descr_t;
-struct jobq_s;
+struct starpu_jobq_s;
 struct starpu_job_s;
 enum starpu_perf_archtype;
 
@@ -96,7 +96,7 @@ double _starpu_regression_based_job_expected_length(struct starpu_perfmodel_t *m
 void _starpu_update_perfmodel_history(struct starpu_job_s *j, enum starpu_perf_archtype arch,
 				unsigned cpuid, double measured);
 
-double _starpu_data_expected_penalty(struct jobq_s *q, struct starpu_task *task);
+double _starpu_data_expected_penalty(struct starpu_jobq_s *q, struct starpu_task *task);
 
 void _starpu_create_sampling_directory_if_needed(void);
 

+ 12 - 12
src/core/policies/deque-modeling-policy-data-aware.c

@@ -18,13 +18,13 @@
 #include <core/perfmodel/perfmodel.h>
 
 static unsigned nworkers;
-static struct jobq_s *queue_array[STARPU_NMAXWORKERS];
+static struct starpu_jobq_s *queue_array[STARPU_NMAXWORKERS];
 static int use_prefetch = 0;
 
 static double alpha = 1.0;
 static double beta = 1.0;
 
-static starpu_job_t dmda_pop_task(struct jobq_s *q)
+static starpu_job_t dmda_pop_task(struct starpu_jobq_s *q)
 {
 	struct starpu_job_s *j;
 
@@ -41,7 +41,7 @@ static starpu_job_t dmda_pop_task(struct jobq_s *q)
 	return j;
 }
 
-static void update_data_requests(struct jobq_s *q, struct starpu_task *task)
+static void update_data_requests(struct starpu_jobq_s *q, struct starpu_task *task)
 {
 	uint32_t memory_node = q->memory_node;
 	unsigned nbuffers = task->cl->nbuffers;
@@ -55,7 +55,7 @@ static void update_data_requests(struct jobq_s *q, struct starpu_task *task)
 	}
 }
 
-static int _dmda_push_task(struct jobq_s *q __attribute__ ((unused)) , starpu_job_t j, unsigned prio)
+static int _dmda_push_task(struct starpu_jobq_s *q __attribute__ ((unused)) , starpu_job_t j, unsigned prio)
 {
 	/* find the queue */
 	struct starpu_fifo_jobq_s *fifo;
@@ -178,12 +178,12 @@ static int _dmda_push_task(struct jobq_s *q __attribute__ ((unused)) , starpu_jo
 	}
 }
 
-static int dmda_push_prio_task(struct jobq_s *q, starpu_job_t j)
+static int dmda_push_prio_task(struct starpu_jobq_s *q, starpu_job_t j)
 {
 	return _dmda_push_task(q, j, 1);
 }
 
-static int dmda_push_task(struct jobq_s *q, starpu_job_t j)
+static int dmda_push_task(struct starpu_jobq_s *q, starpu_job_t j)
 {
 	if (j->task->priority == STARPU_MAX_PRIO)
 		return _dmda_push_task(q, j, 1);
@@ -191,9 +191,9 @@ static int dmda_push_task(struct jobq_s *q, starpu_job_t j)
 	return _dmda_push_task(q, j, 0);
 }
 
-static struct jobq_s *init_dmda_fifo(void)
+static struct starpu_jobq_s *init_dmda_fifo(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	q = _starpu_create_fifo();
 
@@ -224,12 +224,12 @@ static void initialize_dmda_policy(struct starpu_machine_config_s *config,
 	if (strval_beta)
 		beta = atof(strval_beta);
 
-	setup_queues(_starpu_init_fifo_queues_mechanisms, init_dmda_fifo, config);
+	_starpu_setup_queues(_starpu_init_fifo_queues_mechanisms, init_dmda_fifo, config);
 }
 
-static struct jobq_s *get_local_queue_dmda(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
+static struct starpu_jobq_s *get_local_queue_dmda(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
 {
-	struct jobq_s *queue;
+	struct starpu_jobq_s *queue;
 	queue = pthread_getspecific(policy->local_queue_key);
 
 	if (!queue)
@@ -244,7 +244,7 @@ static struct jobq_s *get_local_queue_dmda(struct starpu_sched_policy_s *policy
 struct starpu_sched_policy_s sched_dmda_policy = {
 	.init_sched = initialize_dmda_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_dmda,
+	._starpu_get_local_queue = get_local_queue_dmda,
 	.policy_name = "dmda",
 	.policy_description = "data-aware performance model"
 };

+ 12 - 12
src/core/policies/deque-modeling-policy.c

@@ -19,10 +19,10 @@
 #include <core/perfmodel/perfmodel.h>
 
 static unsigned nworkers;
-static struct jobq_s *queue_array[STARPU_NMAXWORKERS];
+static struct starpu_jobq_s *queue_array[STARPU_NMAXWORKERS];
 static int use_prefetch = 0;
 
-static starpu_job_t dm_pop_task(struct jobq_s *q)
+static starpu_job_t dm_pop_task(struct starpu_jobq_s *q)
 {
 	struct starpu_job_s *j;
 
@@ -39,7 +39,7 @@ static starpu_job_t dm_pop_task(struct jobq_s *q)
 	return j;
 }
 
-static struct starpu_job_list_s *dm_pop_every_task(struct jobq_s *q, uint32_t where)
+static struct starpu_job_list_s *dm_pop_every_task(struct starpu_jobq_s *q, uint32_t where)
 {
 	struct starpu_job_list_s *new_list;
 
@@ -64,7 +64,7 @@ static struct starpu_job_list_s *dm_pop_every_task(struct jobq_s *q, uint32_t wh
 
 
 
-static int _dm_push_task(struct jobq_s *q __attribute__ ((unused)), starpu_job_t j, unsigned prio)
+static int _dm_push_task(struct starpu_jobq_s *q __attribute__ ((unused)), starpu_job_t j, unsigned prio)
 {
 	/* find the queue */
 	struct starpu_fifo_jobq_s *fifo;
@@ -139,12 +139,12 @@ static int _dm_push_task(struct jobq_s *q __attribute__ ((unused)), starpu_job_t
 	}
 }
 
-static int dm_push_prio_task(struct jobq_s *q, starpu_job_t j)
+static int dm_push_prio_task(struct starpu_jobq_s *q, starpu_job_t j)
 {
 	return _dm_push_task(q, j, 1);
 }
 
-static int dm_push_task(struct jobq_s *q, starpu_job_t j)
+static int dm_push_task(struct starpu_jobq_s *q, starpu_job_t j)
 {
 	if (j->task->priority == STARPU_MAX_PRIO)
 		return _dm_push_task(q, j, 1);
@@ -152,9 +152,9 @@ static int dm_push_task(struct jobq_s *q, starpu_job_t j)
 	return _dm_push_task(q, j, 0);
 }
 
-static struct jobq_s *init_dm_fifo(void)
+static struct starpu_jobq_s *init_dm_fifo(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	q = _starpu_create_fifo();
 
@@ -182,12 +182,12 @@ static void initialize_dm_policy(struct starpu_machine_config_s *config,
 	fprintf(stderr, "Using prefetch ? %s\n", use_prefetch?"yes":"no");
 #endif
 
-	setup_queues(_starpu_init_fifo_queues_mechanisms, init_dm_fifo, config);
+	_starpu_setup_queues(_starpu_init_fifo_queues_mechanisms, init_dm_fifo, config);
 }
 
-static struct jobq_s *get_local_queue_dm(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
+static struct starpu_jobq_s *get_local_queue_dm(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
 {
-	struct jobq_s *queue;
+	struct starpu_jobq_s *queue;
 	queue = pthread_getspecific(policy->local_queue_key);
 
 	if (!queue)
@@ -202,7 +202,7 @@ static struct jobq_s *get_local_queue_dm(struct starpu_sched_policy_s *policy __
 struct starpu_sched_policy_s sched_dm_policy = {
 	.init_sched = initialize_dm_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_dm,
+	._starpu_get_local_queue = get_local_queue_dm,
 	.policy_name = "dm",
 	.policy_description = "performance model"
 };

+ 5 - 5
src/core/policies/eager-central-policy.c

@@ -22,7 +22,7 @@
  */
 
 /* the former is the actual queue, the latter some container */
-static struct jobq_s *jobq;
+static struct starpu_jobq_s *jobq;
 
 static void init_central_queue_design(void)
 {
@@ -38,7 +38,7 @@ static void init_central_queue_design(void)
 	jobq->_starpu_pop_every_task = _starpu_fifo_pop_every_task;
 }
 
-static struct jobq_s *func_init_central_queue(void)
+static struct starpu_jobq_s *func_init_central_queue(void)
 {
 	/* once again, this is trivial */
 	return jobq;
@@ -47,10 +47,10 @@ static struct jobq_s *func_init_central_queue(void)
 static void initialize_eager_center_policy(struct starpu_machine_config_s *config, 
 		   __attribute__ ((unused)) struct starpu_sched_policy_s *_policy) 
 {
-	setup_queues(init_central_queue_design, func_init_central_queue, config);
+	_starpu_setup_queues(init_central_queue_design, func_init_central_queue, config);
 }
 
-static struct jobq_s *get_local_queue_eager(struct starpu_sched_policy_s *policy 
+static struct starpu_jobq_s *get_local_queue_eager(struct starpu_sched_policy_s *policy 
 						__attribute__ ((unused)))
 {
 	/* this is trivial for that strategy :) */
@@ -60,7 +60,7 @@ static struct jobq_s *get_local_queue_eager(struct starpu_sched_policy_s *policy
 struct starpu_sched_policy_s sched_eager_policy = {
 	.init_sched = initialize_eager_center_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_eager,
+	._starpu_get_local_queue = get_local_queue_eager,
 	.policy_name = "eager",
 	.policy_description = "greedy policy"
 };

+ 5 - 5
src/core/policies/eager-central-priority-policy.c

@@ -17,7 +17,7 @@
 #include <core/policies/eager-central-priority-policy.h>
 
 /* the former is the actual queue, the latter some container */
-static struct jobq_s *jobq;
+static struct starpu_jobq_s *jobq;
 
 static void init_priority_queue_design(void)
 {
@@ -32,7 +32,7 @@ static void init_priority_queue_design(void)
 	jobq->_starpu_pop_task = _starpu_priority_pop_task;
 }
 
-static struct jobq_s *func_init_priority_queue(void)
+static struct starpu_jobq_s *func_init_priority_queue(void)
 {
 	return jobq;
 }
@@ -40,10 +40,10 @@ static struct jobq_s *func_init_priority_queue(void)
 static void initialize_eager_center_priority_policy(struct starpu_machine_config_s *config, 
 			__attribute__ ((unused))	struct starpu_sched_policy_s *_policy) 
 {
-	setup_queues(init_priority_queue_design, func_init_priority_queue, config);
+	_starpu_setup_queues(init_priority_queue_design, func_init_priority_queue, config);
 }
 
-static struct jobq_s *get_local_queue_eager_priority(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
+static struct starpu_jobq_s *get_local_queue_eager_priority(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
 {
 	/* this is trivial for that strategy */
 	return jobq;
@@ -52,7 +52,7 @@ static struct jobq_s *get_local_queue_eager_priority(struct starpu_sched_policy_
 struct starpu_sched_policy_s sched_prio_policy = {
 	.init_sched = initialize_eager_center_priority_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_eager_priority,
+	._starpu_get_local_queue = get_local_queue_eager_priority,
 	.policy_name = "prio",
 	.policy_description = "eager (with priorities)"
 };

+ 5 - 5
src/core/policies/no-prio-policy.c

@@ -22,7 +22,7 @@
  */
 
 /* the former is the actual queue, the latter some container */
-static struct jobq_s *jobq;
+static struct starpu_jobq_s *jobq;
 
 static void init_no_prio_design(void)
 {
@@ -37,7 +37,7 @@ static void init_no_prio_design(void)
 	jobq->_starpu_pop_task = _starpu_fifo_pop_task;
 }
 
-static struct jobq_s *func_init_central_queue(void)
+static struct starpu_jobq_s *func_init_central_queue(void)
 {
 	/* once again, this is trivial */
 	return jobq;
@@ -46,10 +46,10 @@ static struct jobq_s *func_init_central_queue(void)
 void initialize_no_prio_policy(struct starpu_machine_config_s *config, 
 	   __attribute__ ((unused)) struct starpu_sched_policy_s *_policy) 
 {
-	setup_queues(init_no_prio_design, func_init_central_queue, config);
+	_starpu_setup_queues(init_no_prio_design, func_init_central_queue, config);
 }
 
-struct jobq_s *get_local_queue_no_prio(struct starpu_sched_policy_s *policy 
+struct starpu_jobq_s *get_local_queue_no_prio(struct starpu_sched_policy_s *policy 
 					__attribute__ ((unused)))
 {
 	/* this is trivial for that strategy :) */
@@ -59,7 +59,7 @@ struct jobq_s *get_local_queue_no_prio(struct starpu_sched_policy_s *policy
 struct starpu_sched_policy_s sched_no_prio_policy = {
 	.init_sched = initialize_no_prio_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_no_prio,
+	._starpu_get_local_queue = get_local_queue_no_prio,
 	.policy_name = "no-prio",
 	.policy_description = "eager without priority"
 };

+ 11 - 11
src/core/policies/random-policy.c

@@ -18,9 +18,9 @@
 
 /* XXX 32 is set randomly */
 static unsigned nworkers;
-static struct jobq_s *queue_array[32];
+static struct starpu_jobq_s *queue_array[32];
 
-static starpu_job_t random_pop_task(struct jobq_s *q)
+static starpu_job_t random_pop_task(struct starpu_jobq_s *q)
 {
 	struct starpu_job_s *j;
 
@@ -29,7 +29,7 @@ static starpu_job_t random_pop_task(struct jobq_s *q)
 	return j;
 }
 
-static int _random_push_task(struct jobq_s *q __attribute__ ((unused)), starpu_job_t task, unsigned prio)
+static int _random_push_task(struct starpu_jobq_s *q __attribute__ ((unused)), starpu_job_t task, unsigned prio)
 {
 	/* find the queue */
 	struct starpu_fifo_jobq_s *fifo;
@@ -69,19 +69,19 @@ static int _random_push_task(struct jobq_s *q __attribute__ ((unused)), starpu_j
 	}
 }
 
-static int random_push_prio_task(struct jobq_s *q, starpu_job_t task)
+static int random_push_prio_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 	return _random_push_task(q, task, 1);
 }
 
-static int random_push_task(struct jobq_s *q, starpu_job_t task)
+static int random_push_task(struct starpu_jobq_s *q, starpu_job_t task)
 {
 	return _random_push_task(q, task, 0);
 }
 
-static struct jobq_s *init_random_fifo(void)
+static struct starpu_jobq_s *init_random_fifo(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	q = _starpu_create_fifo();
 
@@ -102,12 +102,12 @@ static void initialize_random_policy(struct starpu_machine_config_s *config,
 
 	starpu_srand48(time(NULL));
 
-	setup_queues(_starpu_init_fifo_queues_mechanisms, init_random_fifo, config);
+	_starpu_setup_queues(_starpu_init_fifo_queues_mechanisms, init_random_fifo, config);
 }
 
-static struct jobq_s *get_local_queue_random(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
+static struct starpu_jobq_s *get_local_queue_random(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
 {
-	struct jobq_s *queue;
+	struct starpu_jobq_s *queue;
 	queue = pthread_getspecific(policy->local_queue_key);
 
 	if (!queue)
@@ -122,7 +122,7 @@ static struct jobq_s *get_local_queue_random(struct starpu_sched_policy_s *polic
 struct starpu_sched_policy_s sched_random_policy = {
 	.init_sched = initialize_random_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_random,
+	._starpu_get_local_queue = get_local_queue_random,
 	.policy_name = "random",
 	.policy_description = "weighted random"
 };

+ 7 - 7
src/core/policies/sched_policy.c

@@ -77,7 +77,7 @@ static void load_sched_policy(struct starpu_sched_policy_s *sched_policy)
 
 	policy.init_sched = sched_policy->init_sched;
 	policy.deinit_sched = sched_policy->deinit_sched;
-	policy.get_local_queue = sched_policy->get_local_queue;
+	policy._starpu_get_local_queue = sched_policy->_starpu_get_local_queue;
 
 	pthread_cond_init(&policy.sched_activity_cond, NULL);
 	pthread_mutex_init(&policy.sched_activity_mutex, NULL);
@@ -185,7 +185,7 @@ void _starpu_deinit_sched_policy(struct starpu_machine_config_s *config)
 /* the generic interface that call the proper underlying implementation */
 int _starpu_push_task(starpu_job_t j)
 {
-	struct jobq_s *queue = policy.get_local_queue(&policy);
+	struct starpu_jobq_s *queue = policy._starpu_get_local_queue(&policy);
 
 	/* in case there is no codelet associated to the task (that's a control
 	 * task), we directly execute its callback and enforce the
@@ -217,7 +217,7 @@ int _starpu_push_task(starpu_job_t j)
 	}
 }
 
-struct starpu_job_s * _starpu_pop_task_from_queue(struct jobq_s *queue)
+struct starpu_job_s * _starpu_pop_task_from_queue(struct starpu_jobq_s *queue)
 {
 	STARPU_ASSERT(queue->_starpu_pop_task);
 
@@ -228,12 +228,12 @@ struct starpu_job_s * _starpu_pop_task_from_queue(struct jobq_s *queue)
 
 struct starpu_job_s * _starpu_pop_task(void)
 {
-	struct jobq_s *queue = policy.get_local_queue(&policy);
+	struct starpu_jobq_s *queue = policy._starpu_get_local_queue(&policy);
 
 	return _starpu_pop_task_from_queue(queue);
 }
 
-struct starpu_job_list_s * _starpu_pop_every_task_from_queue(struct jobq_s *queue, uint32_t where)
+struct starpu_job_list_s * _starpu_pop_every_task_from_queue(struct starpu_jobq_s *queue, uint32_t where)
 {
 	STARPU_ASSERT(queue->_starpu_pop_every_task);
 
@@ -245,14 +245,14 @@ struct starpu_job_list_s * _starpu_pop_every_task_from_queue(struct jobq_s *queu
 /* pop every task that can be executed on "where" (eg. GORDON) */
 struct starpu_job_list_s *_starpu_pop_every_task(uint32_t where)
 {
-	struct jobq_s *queue = policy.get_local_queue(&policy);
+	struct starpu_jobq_s *queue = policy._starpu_get_local_queue(&policy);
 
 	return _starpu_pop_every_task_from_queue(queue, where);
 }
 
 void _starpu_wait_on_sched_event(void)
 {
-	struct jobq_s *q = policy.get_local_queue(&policy);
+	struct starpu_jobq_s *q = policy._starpu_get_local_queue(&policy);
 
 	pthread_mutex_lock(&q->activity_mutex);
 

+ 4 - 4
src/core/policies/sched_policy.h

@@ -35,7 +35,7 @@ struct starpu_sched_policy_s {
 	void (*deinit_sched)(struct starpu_machine_config_s *, struct starpu_sched_policy_s *);
 
 	/* anyone can request which queue it is associated to */
-	struct jobq_s *(*get_local_queue)(struct starpu_sched_policy_s *);
+	struct starpu_jobq_s *(*_starpu_get_local_queue)(struct starpu_sched_policy_s *);
 
 	/* name of the policy (optionnal) */
 	const char *policy_name;
@@ -54,13 +54,13 @@ struct starpu_sched_policy_s *_starpu_get_sched_policy(void);
 
 void _starpu_init_sched_policy(struct starpu_machine_config_s *config);
 void _starpu_deinit_sched_policy(struct starpu_machine_config_s *config);
-//void set_local_queue(struct jobq_s *jobq);
+//void _starpu_set_local_queue(struct starpu_jobq_s *jobq);
 
 int _starpu_push_task(starpu_job_t task);
 struct starpu_job_s *_starpu_pop_task(void);
-struct starpu_job_s *_starpu_pop_task_from_queue(struct jobq_s *queue);
+struct starpu_job_s *_starpu_pop_task_from_queue(struct starpu_jobq_s *queue);
 struct starpu_job_list_s *_starpu_pop_every_task(uint32_t where);
-struct starpu_job_list_s * _starpu_pop_every_task_from_queue(struct jobq_s *queue, uint32_t where);
+struct starpu_job_list_s * _starpu_pop_every_task_from_queue(struct starpu_jobq_s *queue, uint32_t where);
 
 void _starpu_wait_on_sched_event(void);
 

+ 19 - 19
src/core/policies/work-stealing-policy.c

@@ -21,7 +21,7 @@
 
 static unsigned nworkers;
 static unsigned rr_worker;
-static struct jobq_s *queue_array[STARPU_NMAXWORKERS];
+static struct starpu_jobq_s *queue_array[STARPU_NMAXWORKERS];
 
 /* keep track of the work performed from the beginning of the algorithm to make
  * better decisions about which queue to select when stealing or deferring work
@@ -49,9 +49,9 @@ static float overload_metric(unsigned id)
 }
 
 /* who to steal work to ? */
-static struct jobq_s *select_victimq(void)
+static struct starpu_jobq_s *select_victimq(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	unsigned attempts = nworkers;
 
@@ -74,9 +74,9 @@ static struct jobq_s *select_victimq(void)
 	return q;
 }
 
-static struct jobq_s *select_workerq(void)
+static struct starpu_jobq_s *select_workerq(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	unsigned attempts = nworkers;
 
@@ -102,10 +102,10 @@ static struct jobq_s *select_workerq(void)
 #else
 
 /* who to steal work to ? */
-static struct jobq_s *select_victimq(void)
+static struct starpu_jobq_s *select_victimq(void)
 {
 
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	q = queue_array[rr_worker];
 
@@ -117,10 +117,10 @@ static struct jobq_s *select_victimq(void)
 
 /* when anonymous threads submit tasks, 
  * we need to select a queue where to dispose them */
-static struct jobq_s *select_workerq(void)
+static struct starpu_jobq_s *select_workerq(void)
 {
 
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	q = queue_array[rr_worker];
 
@@ -131,7 +131,7 @@ static struct jobq_s *select_workerq(void)
 
 #endif
 
-static starpu_job_t ws_pop_task(struct jobq_s *q)
+static starpu_job_t ws_pop_task(struct starpu_jobq_s *q)
 {
 	starpu_job_t j;
 
@@ -143,13 +143,13 @@ static starpu_job_t ws_pop_task(struct jobq_s *q)
 	}
 	
 	/* we need to steal someone's job */
-	struct jobq_s *victimq;
+	struct starpu_jobq_s *victimq;
 	victimq = select_victimq();
 
-	if (!jobq_trylock(victimq))
+	if (!_starpu_jobq_trylock(victimq))
 	{
 		j = _starpu_deque_pop_task(victimq);
-		jobq_unlock(victimq);
+		_starpu_jobq_unlock(victimq);
 
 		TRACE_WORK_STEALING(q, j);
 		performed_total++;
@@ -158,9 +158,9 @@ static starpu_job_t ws_pop_task(struct jobq_s *q)
 	return j;
 }
 
-static struct jobq_s *init_ws_deque(void)
+static struct starpu_jobq_s *init_ws_deque(void)
 {
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	q = _starpu_create_deque();
 
@@ -182,12 +182,12 @@ static void initialize_ws_policy(struct starpu_machine_config_s *config,
 
 	//machineconfig = config;
 
-	setup_queues(_starpu_init_deque_queues_mechanisms, init_ws_deque, config);
+	_starpu_setup_queues(_starpu_init_deque_queues_mechanisms, init_ws_deque, config);
 }
 
-static struct jobq_s *get_local_queue_ws(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
+static struct starpu_jobq_s *get_local_queue_ws(struct starpu_sched_policy_s *policy __attribute__ ((unused)))
 {
-	struct jobq_s *queue;
+	struct starpu_jobq_s *queue;
 	queue = pthread_getspecific(policy->local_queue_key);
 
 	if (!queue) {
@@ -202,7 +202,7 @@ static struct jobq_s *get_local_queue_ws(struct starpu_sched_policy_s *policy __
 struct starpu_sched_policy_s sched_ws_policy = {
 	.init_sched = initialize_ws_policy,
 	.deinit_sched = NULL,
-	.get_local_queue = get_local_queue_ws,
+	._starpu_get_local_queue = get_local_queue_ws,
 	.policy_name = "ws",
 	.policy_description = "work stealing"
 };

+ 3 - 3
src/core/workers.c

@@ -67,7 +67,7 @@ static struct starpu_worker_set_s gordon_worker_set;
 
 static void _starpu_init_worker_queue(struct starpu_worker_s *workerarg)
 {
-	struct jobq_s *jobq = workerarg->jobq;
+	struct starpu_jobq_s *jobq = workerarg->jobq;
 
 	/* warning : in case there are multiple workers on the same
 	  queue, we overwrite this value so that it is meaningless */
@@ -333,7 +333,7 @@ typedef enum {
 static void _starpu_operate_on_all_queues_attached_to_node(unsigned nodeid, queue_op op)
 {
 	unsigned q_id;
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	starpu_mem_node_descr * const descr = _starpu_get_memory_node_description();
 
@@ -378,7 +378,7 @@ inline void _starpu_broadcast_all_queues_attached_to_node(unsigned node)
 static void _starpu_operate_on_all_queues(queue_op op)
 {
 	unsigned q_id;
-	struct jobq_s *q;
+	struct starpu_jobq_s *q;
 
 	starpu_mem_node_descr * const descr = _starpu_get_memory_node_description();
 

+ 1 - 1
src/core/workers.h

@@ -72,7 +72,7 @@ struct starpu_worker_s {
 	int workerid; /* uniquely identify the worker among all processing units types */
         pthread_cond_t ready_cond; /* indicate when the worker is ready */
 	unsigned memory_node; /* which memory node is associated that worker to ? */
-	struct jobq_s *jobq; /* in which queue will that worker get/put tasks ? */
+	struct starpu_jobq_s *jobq; /* in which queue will that worker get/put tasks ? */
 	struct starpu_job_list_s *local_jobs; /* this queue contains tasks that have been explicitely submitted to that queue */
 	pthread_mutex_t local_jobs_mutex; /* protect the local_jobs list */
 	struct starpu_worker_set_s *set; /* in case this worker belongs to a set */

+ 1 - 1
src/datawizard/copy-driver.c

@@ -34,7 +34,7 @@ void _starpu_wake_all_blocked_workers_on_node(unsigned nodeid)
 	unsigned nqueues = descr->queues_count[nodeid];
 	for (q_id = 0; q_id < nqueues; q_id++)
 	{
-		struct jobq_s *q;
+		struct starpu_jobq_s *q;
 		q  = descr->attached_queues_per_node[nodeid][q_id];
 
 		/* wake anybody waiting on that queue */

+ 1 - 1
src/datawizard/memory_nodes.c

@@ -102,7 +102,7 @@ unsigned _starpu_register_memory_node(starpu_node_kind kind)
 
 /* TODO move in a more appropriate file  !! */
 /* attach a queue to a memory node (if it's not already attached) */
-void _starpu_memory_node_attach_queue(struct jobq_s *q, unsigned nodeid)
+void _starpu_memory_node_attach_queue(struct starpu_jobq_s *q, unsigned nodeid)
 {
 	unsigned queue;
 	unsigned nqueues_total, nqueues;

+ 3 - 3
src/datawizard/memory_nodes.h

@@ -39,8 +39,8 @@ typedef struct {
 	// XXX 32 is set randomly !
 	// TODO move this 2 lists outside starpu_mem_node_descr
 	pthread_rwlock_t attached_queues_rwlock;
-	struct jobq_s *attached_queues_per_node[STARPU_MAXNODES][32];
-	struct jobq_s *attached_queues_all[STARPU_MAXNODES*32];
+	struct starpu_jobq_s *attached_queues_per_node[STARPU_MAXNODES][32];
+	struct starpu_jobq_s *attached_queues_all[STARPU_MAXNODES*32];
 	/* the number of queues attached to each node */
 	unsigned total_queues_count;
 	unsigned queues_count[STARPU_MAXNODES];
@@ -51,7 +51,7 @@ void _starpu_deinit_memory_nodes(void);
 void _starpu_set_local_memory_node_key(unsigned *node);
 unsigned _starpu_get_local_memory_node(void);
 unsigned _starpu_register_memory_node(starpu_node_kind kind);
-void _starpu_memory_node_attach_queue(struct jobq_s *q, unsigned nodeid);
+void _starpu_memory_node_attach_queue(struct starpu_jobq_s *q, unsigned nodeid);
 
 starpu_node_kind _starpu_get_node_kind(uint32_t node);
 unsigned _starpu_get_memory_nodes_count(void);

+ 5 - 5
src/drivers/cpu/driver_cpu.c

@@ -111,7 +111,7 @@ void *_starpu_cpu_worker(void *arg)
 
 	_starpu_set_local_memory_node_key(&cpu_arg->memory_node);
 
-	set_local_queue(cpu_arg->jobq);
+	_starpu_set_local_queue(cpu_arg->jobq);
 
 	_starpu_set_local_worker_key(cpu_arg);
 
@@ -140,7 +140,7 @@ void *_starpu_cpu_worker(void *arg)
 	int res;
 
 	struct starpu_sched_policy_s *policy = _starpu_get_sched_policy();
-	struct jobq_s *queue = policy->get_local_queue(policy);
+	struct starpu_jobq_s *queue = policy->_starpu_get_local_queue(policy);
 	unsigned memnode = cpu_arg->memory_node;
 
 	while (_starpu_machine_is_running())
@@ -151,7 +151,7 @@ void *_starpu_cpu_worker(void *arg)
 
 		_starpu_execute_registered_progression_hooks();
 
-		jobq_lock(queue);
+		_starpu_jobq_lock(queue);
 
 		/* perhaps there is some local task to be executed first */
 		j = _starpu_pop_local_task(cpu_arg);
@@ -163,11 +163,11 @@ void *_starpu_cpu_worker(void *arg)
                 if (j == NULL) {
 			if (_starpu_worker_can_block(memnode))
 				pthread_cond_wait(&queue->activity_cond, &queue->activity_mutex);
-			jobq_unlock(queue);
+			_starpu_jobq_unlock(queue);
  			continue;
 		};
 		
-		jobq_unlock(queue);
+		_starpu_jobq_unlock(queue);
 
 		/* can a cpu perform that task ? */
 		if (!STARPU_CPU_MAY_PERFORM(j)) 

+ 5 - 5
src/drivers/cuda/driver_cuda.c

@@ -179,7 +179,7 @@ void *_starpu_cuda_worker(void *arg)
 
 	_starpu_set_local_memory_node_key(&(args->memory_node));
 
-	set_local_queue(args->jobq);
+	_starpu_set_local_queue(args->jobq);
 
 	_starpu_set_local_worker_key(args);
 
@@ -222,7 +222,7 @@ void *_starpu_cuda_worker(void *arg)
 	int res;
 
 	struct starpu_sched_policy_s *policy = _starpu_get_sched_policy();
-	struct jobq_s *queue = policy->get_local_queue(policy);
+	struct starpu_jobq_s *queue = policy->_starpu_get_local_queue(policy);
 	unsigned memnode = args->memory_node;
 	
 	while (_starpu_machine_is_running())
@@ -233,7 +233,7 @@ void *_starpu_cuda_worker(void *arg)
 
 		_starpu_execute_registered_progression_hooks();
 	
-		jobq_lock(queue);
+		_starpu_jobq_lock(queue);
 
 		/* perhaps there is some local task to be executed first */
 		j = _starpu_pop_local_task(args);
@@ -245,11 +245,11 @@ void *_starpu_cuda_worker(void *arg)
 		if (j == NULL) {
 			if (_starpu_worker_can_block(memnode))
 				pthread_cond_wait(&queue->activity_cond, &queue->activity_mutex);
-			jobq_unlock(queue);
+			_starpu_jobq_unlock(queue);
 			continue;
 		}
 
-		jobq_unlock(queue);
+		_starpu_jobq_unlock(queue);
 
 		/* can CUDA do that task ? */
 		if (!STARPU_CUDA_MAY_PERFORM(j))