Explorar o código

Prefixing of type job and associated list functionalities

find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_t\b"/starpu_job_t/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_t\b"/starpu_job_list_t/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_itor_t\b"/starpu_job_itor_t/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_new\b"/starpu_job_new/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_delete\b"/starpu_job_delete/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_new\b"/starpu_job_list_new/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_delete\b"/starpu_job_list_delete/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_empty\b"/starpu_job_list_empty/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_erase\b"/starpu_job_list_erase/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_push_back\b"/starpu_job_list_push_back/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_push_front\b"/starpu_job_list_push_front/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_pop_back\b"/starpu_job_list_pop_back/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_pop_front\b"/starpu_job_list_pop_front/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_back\b"/starpu_job_list_back/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_front\b"/starpu_job_list_front/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_check\b"/starpu_job_list_check/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_s\b"/starpu_job_s/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_s\b"/starpu_job_list_s/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_begin\b"/starpu_job_list_begin/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_end\b"/starpu_job_list_end/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bjob_list_next\b"/starpu_job_list_next/g
Nathalie Furmento %!s(int64=15) %!d(string=hai) anos
pai
achega
e477195279
Modificáronse 39 ficheiros con 216 adicións e 216 borrados
  1. 4 4
      examples/pastix-wrappers/starpu-blas-wrapper.c
  2. 1 1
      src/common/fxt.h
  3. 1 1
      src/core/dependencies/cg.c
  4. 2 2
      src/core/dependencies/cg.h
  5. 5 5
      src/core/dependencies/data-concurrency.c
  6. 1 1
      src/core/dependencies/data-concurrency.h
  7. 3 3
      src/core/dependencies/tags.c
  8. 5 5
      src/core/dependencies/tags.h
  9. 4 4
      src/core/dependencies/task-deps.c
  10. 20 20
      src/core/jobs.c
  11. 11 11
      src/core/jobs.h
  12. 18 18
      src/core/mechanisms/deque_queues.c
  13. 4 4
      src/core/mechanisms/deque_queues.h
  14. 19 19
      src/core/mechanisms/fifo_queues.c
  15. 5 5
      src/core/mechanisms/fifo_queues.h
  16. 6 6
      src/core/mechanisms/priority_queues.c
  17. 3 3
      src/core/mechanisms/priority_queues.h
  18. 4 4
      src/core/mechanisms/queues.h
  19. 8 8
      src/core/mechanisms/stack_queues.c
  20. 4 4
      src/core/mechanisms/stack_queues.h
  21. 1 1
      src/core/perfmodel/perfmodel.c
  22. 5 5
      src/core/perfmodel/perfmodel.h
  23. 3 3
      src/core/perfmodel/perfmodel_history.c
  24. 5 5
      src/core/policies/deque-modeling-policy-data-aware.c
  25. 11 11
      src/core/policies/deque-modeling-policy.c
  26. 5 5
      src/core/policies/random-policy.c
  27. 7 7
      src/core/policies/sched_policy.c
  28. 5 5
      src/core/policies/sched_policy.h
  29. 2 2
      src/core/policies/work-stealing-policy.c
  30. 8 8
      src/core/task.c
  31. 2 2
      src/core/task.h
  32. 4 4
      src/core/workers.c
  33. 2 2
      src/core/workers.h
  34. 1 1
      src/datawizard/data_request.h
  35. 1 1
      src/datawizard/footprint.c
  36. 2 2
      src/datawizard/footprint.h
  37. 2 2
      src/drivers/cpu/driver_cpu.c
  38. 2 2
      src/drivers/cuda/driver_cuda.c
  39. 20 20
      src/drivers/gordon/driver_gordon.c

+ 4 - 4
examples/pastix-wrappers/starpu-blas-wrapper.c

@@ -226,7 +226,7 @@ void STARPU_DECLARE_WORK_BLOCKS(float *maxbloktab1, float *maxbloktab2, unsigned
 	starpu_register_vector_data(&work_block_2, 0 /* home */, (uintptr_t)maxbloktab2, solv_coefmax, sizeof(float));
 	starpu_register_vector_data(&work_block_2, 0 /* home */, (uintptr_t)maxbloktab2, solv_coefmax, sizeof(float));
 
 
 	starpu_codelet cl;
 	starpu_codelet cl;
-	job_t j;
+	starpu_job_t j;
 	sem_t sem;
 	sem_t sem;
 
 
 	/* initialize codelet */
 	/* initialize codelet */
@@ -314,7 +314,7 @@ void STARPU_CBLK_STRSM(unsigned col)
 {
 {
 	/* perform a strsm on the block column */
 	/* perform a strsm on the block column */
 	starpu_codelet cl;
 	starpu_codelet cl;
-	job_t j;
+	starpu_job_t j;
 	sem_t sem;
 	sem_t sem;
 
 
 	/* initialize codelet */
 	/* initialize codelet */
@@ -454,7 +454,7 @@ void STARPU_COMPUTE_CONTRIB_COMPACT(unsigned col, int dimi, int dimj, int dima,
 		args.dima = dima;
 		args.dima = dima;
 
 
 	starpu_codelet cl;
 	starpu_codelet cl;
-	job_t j;
+	starpu_job_t j;
 	sem_t sem;
 	sem_t sem;
 
 
 	/* initialize codelet */
 	/* initialize codelet */
@@ -574,7 +574,7 @@ void STARPU_SGEMM (const char *transa, const char *transb, const int m,
 	data_state C_state;
 	data_state C_state;
 
 
 	starpu_codelet cl;
 	starpu_codelet cl;
-	job_t j;
+	starpu_job_t j;
 	sem_t sem;
 	sem_t sem;
 
 
 //	fprintf(stderr, "STARPU - SGEMM - TRANSA %c TRANSB %c m %d n %d k %d lda %d ldb %d ldc %d \n", *transa, *transb, m, n, k, lda, ldb, ldc);
 //	fprintf(stderr, "STARPU - SGEMM - TRANSA %c TRANSB %c m %d n %d k %d lda %d ldb %d ldc %d \n", *transa, *transb, m, n, k, lda, ldb, ldc);

+ 1 - 1
src/common/fxt.h

@@ -169,7 +169,7 @@ do {									\
 
 
 #define TRACE_TASK_DONE(tag)							\
 #define TRACE_TASK_DONE(tag)							\
 do {										\
 do {										\
-	struct job_s *job = (tag)->job;						\
+	struct starpu_job_s *job = (tag)->job;						\
 	if (job && job->task 							\
 	if (job && job->task 							\
 		&& job->task->cl						\
 		&& job->task->cl						\
 		&& job->task->cl->model						\
 		&& job->task->cl->model						\

+ 1 - 1
src/core/dependencies/cg.c

@@ -67,7 +67,7 @@ void _starpu_notify_cg(cg_t *cg)
 
 
 		struct tag_s *tag;
 		struct tag_s *tag;
 		struct cg_list_s *tag_successors, *job_successors;
 		struct cg_list_s *tag_successors, *job_successors;
-		job_t j;
+		starpu_job_t j;
 
 
 		/* the group is now completed */
 		/* the group is now completed */
 		switch (cg->cg_type) {
 		switch (cg->cg_type) {

+ 2 - 2
src/core/dependencies/cg.h

@@ -59,7 +59,7 @@ typedef struct cg_s {
 		struct tag_s *tag;
 		struct tag_s *tag;
 
 
 		/* CG_TASK */
 		/* CG_TASK */
-		struct job_s *job;
+		struct starpu_job_s *job;
 
 
 		/* CG_APPS */
 		/* CG_APPS */
 		/* in case this completion group is related to an application,
 		/* in case this completion group is related to an application,
@@ -77,6 +77,6 @@ void _starpu_cg_list_init(struct cg_list_s *list);
 void _starpu_add_successor_to_cg_list(struct cg_list_s *successors, cg_t *cg);
 void _starpu_add_successor_to_cg_list(struct cg_list_s *successors, cg_t *cg);
 void _starpu_notify_cg(cg_t *cg);
 void _starpu_notify_cg(cg_t *cg);
 void _starpu_notify_cg_list(struct cg_list_s *successors);
 void _starpu_notify_cg_list(struct cg_list_s *successors);
-void _starpu_notify_task_dependencies(struct job_s *j);
+void _starpu_notify_task_dependencies(struct starpu_job_s *j);
 
 
 #endif // __CG_H__
 #endif // __CG_H__

+ 5 - 5
src/core/dependencies/data-concurrency.c

@@ -19,11 +19,11 @@
 #include <core/policies/sched_policy.h>
 #include <core/policies/sched_policy.h>
 #include <common/starpu-spinlock.h>
 #include <common/starpu-spinlock.h>
 
 
-static unsigned _submit_job_enforce_data_deps(job_t j, unsigned start_buffer_index);
+static unsigned _submit_job_enforce_data_deps(starpu_job_t j, unsigned start_buffer_index);
 
 
 static unsigned unlock_one_requester(starpu_data_requester_t r)
 static unsigned unlock_one_requester(starpu_data_requester_t r)
 {
 {
-	job_t j = r->j;
+	starpu_job_t j = r->j;
 	unsigned nbuffers = j->task->cl->nbuffers;
 	unsigned nbuffers = j->task->cl->nbuffers;
 	unsigned buffer_index = r->buffer_index;
 	unsigned buffer_index = r->buffer_index;
 
 
@@ -110,7 +110,7 @@ unsigned attempt_to_submit_data_request_from_apps(starpu_data_handle handle, sta
 	return ret;
 	return ret;
 }
 }
 
 
-static unsigned attempt_to_submit_data_request_from_job(job_t j, unsigned buffer_index)
+static unsigned attempt_to_submit_data_request_from_job(starpu_job_t j, unsigned buffer_index)
 {
 {
 	unsigned ret;
 	unsigned ret;
 
 
@@ -162,7 +162,7 @@ static unsigned attempt_to_submit_data_request_from_job(job_t j, unsigned buffer
 	return ret;
 	return ret;
 }
 }
 
 
-static unsigned _submit_job_enforce_data_deps(job_t j, unsigned start_buffer_index)
+static unsigned _submit_job_enforce_data_deps(starpu_job_t j, unsigned start_buffer_index)
 {
 {
 	unsigned buf;
 	unsigned buf;
 
 
@@ -182,7 +182,7 @@ static unsigned _submit_job_enforce_data_deps(job_t j, unsigned start_buffer_ind
    with concurrent data-access at the same time in the scheduling engine (eg.
    with concurrent data-access at the same time in the scheduling engine (eg.
    there can be 2 tasks reading a piece of data, but there cannot be one
    there can be 2 tasks reading a piece of data, but there cannot be one
    reading and another writing) */
    reading and another writing) */
-unsigned _starpu_submit_job_enforce_data_deps(job_t j)
+unsigned _starpu_submit_job_enforce_data_deps(starpu_job_t j)
 {
 {
 	if ((j->task->cl == NULL) || (j->task->cl->nbuffers == 0))
 	if ((j->task->cl == NULL) || (j->task->cl->nbuffers == 0))
 		return 0;
 		return 0;

+ 1 - 1
src/core/dependencies/data-concurrency.h

@@ -19,7 +19,7 @@
 
 
 #include <core/jobs.h>
 #include <core/jobs.h>
 
 
-unsigned _starpu_submit_job_enforce_data_deps(job_t j);
+unsigned _starpu_submit_job_enforce_data_deps(starpu_job_t j);
 
 
 void notify_data_dependencies(starpu_data_handle handle);
 void notify_data_dependencies(starpu_data_handle handle);
 
 

+ 3 - 3
src/core/dependencies/tags.c

@@ -144,7 +144,7 @@ void _starpu_tag_set_ready(struct tag_s *tag)
 	/* mark this tag as ready to run */
 	/* mark this tag as ready to run */
 	tag->state = READY;
 	tag->state = READY;
 	/* declare it to the scheduler ! */
 	/* declare it to the scheduler ! */
-	struct job_s *j = tag->job;
+	struct starpu_job_s *j = tag->job;
 
 
 	/* In case the task job is going to be scheduled immediately, and if
 	/* In case the task job is going to be scheduled immediately, and if
 	 * the task is "empty", calling push_task would directly try to enforce
 	 * the task is "empty", calling push_task would directly try to enforce
@@ -183,7 +183,7 @@ static void _starpu_notify_tag_dependencies(struct tag_s *tag)
 	starpu_spin_unlock(&tag->lock);
 	starpu_spin_unlock(&tag->lock);
 }
 }
 
 
-void _starpu_notify_dependencies(struct job_s *j)
+void _starpu_notify_dependencies(struct starpu_job_s *j)
 {
 {
 	STARPU_ASSERT(j);
 	STARPU_ASSERT(j);
 	STARPU_ASSERT(j->task);
 	STARPU_ASSERT(j->task);
@@ -203,7 +203,7 @@ void starpu_tag_notify_from_apps(starpu_tag_t id)
 	_starpu_notify_tag_dependencies(tag);
 	_starpu_notify_tag_dependencies(tag);
 }
 }
 
 
-void _starpu_tag_declare(starpu_tag_t id, struct job_s *job)
+void _starpu_tag_declare(starpu_tag_t id, struct starpu_job_s *job)
 {
 {
 	TRACE_CODELET_TAG(id, job);
 	TRACE_CODELET_TAG(id, job);
 	job->task->use_tag = 1;
 	job->task->use_tag = 1;

+ 5 - 5
src/core/dependencies/tags.h

@@ -41,7 +41,7 @@ typedef enum {
 	DONE
 	DONE
 } tag_state;
 } tag_state;
 
 
-struct job_s;
+struct starpu_job_s;
 
 
 struct tag_s {
 struct tag_s {
 	starpu_spinlock_t lock;
 	starpu_spinlock_t lock;
@@ -50,7 +50,7 @@ struct tag_s {
 
 
 	struct cg_list_s tag_successors;
 	struct cg_list_s tag_successors;
 
 
-	struct job_s *job; /* which job is associated to the tag if any ? */
+	struct starpu_job_s *job; /* which job is associated to the tag if any ? */
 
 
 	unsigned is_assigned;
 	unsigned is_assigned;
 	unsigned is_submitted;
 	unsigned is_submitted;
@@ -58,10 +58,10 @@ struct tag_s {
 
 
 void starpu_tag_declare_deps(starpu_tag_t id, unsigned ndeps, ...);
 void starpu_tag_declare_deps(starpu_tag_t id, unsigned ndeps, ...);
 
 
-void _starpu_notify_dependencies(struct job_s *j);
-void _starpu_tag_declare(starpu_tag_t id, struct job_s *job);
+void _starpu_notify_dependencies(struct starpu_job_s *j);
+void _starpu_tag_declare(starpu_tag_t id, struct starpu_job_s *job);
 void _starpu_tag_set_ready(struct tag_s *tag);
 void _starpu_tag_set_ready(struct tag_s *tag);
 
 
-unsigned submit_job_enforce_task_deps(struct job_s *j);
+unsigned submit_job_enforce_task_deps(struct starpu_job_s *j);
 
 
 #endif // __TAGS_H__
 #endif // __TAGS_H__

+ 4 - 4
src/core/dependencies/task-deps.c

@@ -23,7 +23,7 @@
 #include <core/policies/sched_policy.h>
 #include <core/policies/sched_policy.h>
 #include <core/dependencies/data-concurrency.h>
 #include <core/dependencies/data-concurrency.h>
 
 
-static cg_t *create_cg_task(unsigned ntags, job_t j)
+static cg_t *create_cg_task(unsigned ntags, starpu_job_t j)
 {
 {
 	cg_t *cg = malloc(sizeof(cg_t));
 	cg_t *cg = malloc(sizeof(cg_t));
 	STARPU_ASSERT(cg);
 	STARPU_ASSERT(cg);
@@ -39,7 +39,7 @@ static cg_t *create_cg_task(unsigned ntags, job_t j)
 }
 }
 
 
 /* the job lock must be taken */
 /* the job lock must be taken */
-static void _starpu_task_add_succ(job_t j, cg_t *cg)
+static void _starpu_task_add_succ(starpu_job_t j, cg_t *cg)
 {
 {
 	STARPU_ASSERT(j);
 	STARPU_ASSERT(j);
 
 
@@ -51,7 +51,7 @@ static void _starpu_task_add_succ(job_t j, cg_t *cg)
 	}
 	}
 }
 }
 
 
-void _starpu_notify_task_dependencies(job_t j)
+void _starpu_notify_task_dependencies(starpu_job_t j)
 {
 {
 	_starpu_notify_cg_list(&j->job_successors);
 	_starpu_notify_cg_list(&j->job_successors);
 }
 }
@@ -61,7 +61,7 @@ void starpu_task_declare_deps_array(struct starpu_task *task, unsigned ndeps, st
 {
 {
 	unsigned i;
 	unsigned i;
 
 
-	job_t job;
+	starpu_job_t job;
 
 
 	job = _starpu_get_job_associated_to_task(task);
 	job = _starpu_get_job_associated_to_task(task);
 	cg_t *cg = create_cg_task(ndeps, job);
 	cg_t *cg = create_cg_task(ndeps, job);

+ 20 - 20
src/core/jobs.c

@@ -20,7 +20,7 @@
 #include <core/dependencies/data-concurrency.h>
 #include <core/dependencies/data-concurrency.h>
 #include <common/config.h>
 #include <common/config.h>
 
 
-size_t _starpu_job_get_data_size(job_t j)
+size_t _starpu_job_get_data_size(starpu_job_t j)
 {
 {
 	size_t size = 0;
 	size_t size = 0;
 
 
@@ -38,12 +38,12 @@ size_t _starpu_job_get_data_size(job_t j)
 	return size;
 	return size;
 }
 }
 
 
-/* create an internal job_t structure to encapsulate the task */
-job_t __attribute__((malloc)) _starpu_job_create(struct starpu_task *task)
+/* create an internal starpu_job_t structure to encapsulate the task */
+starpu_job_t __attribute__((malloc)) _starpu_job_create(struct starpu_task *task)
 {
 {
-	job_t job;
+	starpu_job_t job;
 
 
-	job = job_new();
+	job = starpu_job_new();
 
 
 	job->task = task;
 	job->task = task;
 
 
@@ -62,7 +62,7 @@ job_t __attribute__((malloc)) _starpu_job_create(struct starpu_task *task)
 	return job;
 	return job;
 }
 }
 
 
-void starpu_wait_job(job_t j)
+void starpu_wait_job(starpu_job_t j)
 {
 {
 	STARPU_ASSERT(j->task);
 	STARPU_ASSERT(j->task);
 	STARPU_ASSERT(!j->task->detach);
 	STARPU_ASSERT(!j->task->detach);
@@ -77,10 +77,10 @@ void starpu_wait_job(job_t j)
 
 
 	pthread_mutex_unlock(&j->sync_mutex);
 	pthread_mutex_unlock(&j->sync_mutex);
 
 
-	//job_delete(j);
+	//starpu_job_delete(j);
 }
 }
 
 
-void _starpu_handle_job_termination(job_t j)
+void _starpu_handle_job_termination(starpu_job_t j)
 {
 {
 	struct starpu_task *task = j->task;
 	struct starpu_task *task = j->task;
 
 
@@ -129,7 +129,7 @@ void _starpu_handle_job_termination(job_t j)
 
 
 		if (destroy)
 		if (destroy)
 		{
 		{
-			job_delete(j);
+			starpu_job_delete(j);
 			free(task);
 			free(task);
 		}
 		}
 	}
 	}
@@ -148,7 +148,7 @@ void _starpu_handle_job_termination(job_t j)
 
 
 /* This function is called when a new task is submitted to StarPU 
 /* This function is called when a new task is submitted to StarPU 
  * it returns 1 if the tag deps are not fulfilled, 0 otherwise */
  * it returns 1 if the tag deps are not fulfilled, 0 otherwise */
-static unsigned _starpu_not_all_tag_deps_are_fulfilled(job_t j)
+static unsigned _starpu_not_all_tag_deps_are_fulfilled(starpu_job_t j)
 {
 {
 	unsigned ret;
 	unsigned ret;
 
 
@@ -181,7 +181,7 @@ static unsigned _starpu_not_all_tag_deps_are_fulfilled(job_t j)
 	return ret;
 	return ret;
 }
 }
 
 
-static unsigned _starpu_not_all_task_deps_are_fulfilled(job_t j)
+static unsigned _starpu_not_all_task_deps_are_fulfilled(starpu_job_t j)
 {
 {
 	unsigned ret;
 	unsigned ret;
 
 
@@ -208,7 +208,7 @@ static unsigned _starpu_not_all_task_deps_are_fulfilled(job_t j)
  *	In order, we enforce tag, task and data dependencies. The task is
  *	In order, we enforce tag, task and data dependencies. The task is
  *	passed to the scheduler only once all these constraints are fulfilled.
  *	passed to the scheduler only once all these constraints are fulfilled.
  */
  */
-unsigned _starpu_enforce_deps_and_schedule(job_t j)
+unsigned _starpu_enforce_deps_and_schedule(starpu_job_t j)
 {
 {
 	unsigned ret;
 	unsigned ret;
 
 
@@ -230,7 +230,7 @@ unsigned _starpu_enforce_deps_and_schedule(job_t j)
 }
 }
 
 
 /* Tag deps are already fulfilled */
 /* Tag deps are already fulfilled */
-unsigned _starpu_enforce_deps_starting_from_task(job_t j)
+unsigned _starpu_enforce_deps_starting_from_task(starpu_job_t j)
 {
 {
 	unsigned ret;
 	unsigned ret;
 
 
@@ -248,7 +248,7 @@ unsigned _starpu_enforce_deps_starting_from_task(job_t j)
 }
 }
 
 
 /* Tag and task deps are already fulfilled */
 /* Tag and task deps are already fulfilled */
-unsigned _starpu_enforce_deps_starting_from_data(job_t j)
+unsigned _starpu_enforce_deps_starting_from_data(starpu_job_t j)
 {
 {
 	unsigned ret;
 	unsigned ret;
 
 
@@ -264,27 +264,27 @@ unsigned _starpu_enforce_deps_starting_from_data(job_t j)
 
 
 
 
 
 
-struct job_s *_starpu_pop_local_task(struct worker_s *worker)
+struct starpu_job_s *_starpu_pop_local_task(struct worker_s *worker)
 {
 {
-	struct job_s *j = NULL;
+	struct starpu_job_s *j = NULL;
 
 
 	pthread_mutex_lock(&worker->local_jobs_mutex);
 	pthread_mutex_lock(&worker->local_jobs_mutex);
 
 
-	if (!job_list_empty(worker->local_jobs))
-		j = job_list_pop_back(worker->local_jobs);
+	if (!starpu_job_list_empty(worker->local_jobs))
+		j = starpu_job_list_pop_back(worker->local_jobs);
 
 
 	pthread_mutex_unlock(&worker->local_jobs_mutex);
 	pthread_mutex_unlock(&worker->local_jobs_mutex);
 
 
 	return j;
 	return j;
 }
 }
 
 
-int _starpu_push_local_task(struct worker_s *worker, struct job_s *j)
+int _starpu_push_local_task(struct worker_s *worker, struct starpu_job_s *j)
 {
 {
 	/* TODO check that the worker is able to execute the task ! */
 	/* TODO check that the worker is able to execute the task ! */
 
 
 	pthread_mutex_lock(&worker->local_jobs_mutex);
 	pthread_mutex_lock(&worker->local_jobs_mutex);
 
 
-	job_list_push_front(worker->local_jobs, j);
+	starpu_job_list_push_front(worker->local_jobs, j);
 
 
 	pthread_mutex_unlock(&worker->local_jobs_mutex);
 	pthread_mutex_unlock(&worker->local_jobs_mutex);
 
 

+ 11 - 11
src/core/jobs.h

@@ -51,7 +51,7 @@ typedef void (*callback)(void *);
 #define STARPU_GORDON_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_GORDON)
 #define STARPU_GORDON_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_GORDON)
 
 
 /* a job is the internal representation of a task */
 /* a job is the internal representation of a task */
-LIST_TYPE(job,
+LIST_TYPE(starpu_job,
 	struct starpu_task *task;
 	struct starpu_task *task;
 
 
 	pthread_mutex_t sync_mutex;
 	pthread_mutex_t sync_mutex;
@@ -69,21 +69,21 @@ LIST_TYPE(job,
 	unsigned terminated;
 	unsigned terminated;
 );
 );
 
 
-job_t __attribute__((malloc)) _starpu_job_create(struct starpu_task *task);
-void starpu_wait_job(job_t j);
+starpu_job_t __attribute__((malloc)) _starpu_job_create(struct starpu_task *task);
+void starpu_wait_job(starpu_job_t j);
 
 
 /* try to submit job j, enqueue it if it's not schedulable yet */
 /* try to submit job j, enqueue it if it's not schedulable yet */
-unsigned _starpu_enforce_deps_and_schedule(job_t j);
-unsigned _starpu_enforce_deps_starting_from_task(job_t j);
-unsigned _starpu_enforce_deps_starting_from_data(job_t j);
+unsigned _starpu_enforce_deps_and_schedule(starpu_job_t j);
+unsigned _starpu_enforce_deps_starting_from_task(starpu_job_t j);
+unsigned _starpu_enforce_deps_starting_from_data(starpu_job_t j);
 
 
 
 
 //#warning this must not be exported anymore ... 
 //#warning this must not be exported anymore ... 
-//job_t _starpu_job_create(struct starpu_task *task);
-void _starpu_handle_job_termination(job_t j);
-size_t _starpu_job_get_data_size(job_t j);
+//starpu_job_t _starpu_job_create(struct starpu_task *task);
+void _starpu_handle_job_termination(starpu_job_t j);
+size_t _starpu_job_get_data_size(starpu_job_t j);
 
 
-job_t _starpu_pop_local_task(struct worker_s *worker);
-int _starpu_push_local_task(struct worker_s *worker, job_t j);
+starpu_job_t _starpu_pop_local_task(struct worker_s *worker);
+int _starpu_push_local_task(struct worker_s *worker, starpu_job_t j);
 
 
 #endif // __JOBS_H__
 #endif // __JOBS_H__

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

@@ -48,7 +48,7 @@ struct jobq_s *create_deque(void)
 	deque = malloc(sizeof(struct deque_jobq_s));
 	deque = malloc(sizeof(struct deque_jobq_s));
 
 
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
-	deque->jobq = job_list_new();
+	deque->jobq = starpu_job_list_new();
 	deque->njobs = 0;
 	deque->njobs = 0;
 	deque->nprocessed = 0;
 	deque->nprocessed = 0;
 
 
@@ -84,12 +84,12 @@ unsigned get_deque_nprocessed(struct jobq_s *q)
 	return deque_queue->nprocessed;
 	return deque_queue->nprocessed;
 }
 }
 
 
-int deque_push_prio_task(struct jobq_s *q, job_t task)
+int deque_push_prio_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 	return deque_push_task(q, task);
 	return deque_push_task(q, task);
 }
 }
 
 
-int deque_push_task(struct jobq_s *q, job_t task)
+int deque_push_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct deque_jobq_s *deque_queue = q->queue;
 	struct deque_jobq_s *deque_queue = q->queue;
@@ -104,7 +104,7 @@ int deque_push_task(struct jobq_s *q, job_t task)
 	pthread_mutex_lock(&q->activity_mutex);
 	pthread_mutex_lock(&q->activity_mutex);
 
 
 	TRACE_JOB_PUSH(task, 0);
 	TRACE_JOB_PUSH(task, 0);
-	job_list_push_front(deque_queue->jobq, task);
+	starpu_job_list_push_front(deque_queue->jobq, task);
 	deque_queue->njobs++;
 	deque_queue->njobs++;
 	deque_queue->nprocessed++;
 	deque_queue->nprocessed++;
 
 
@@ -114,9 +114,9 @@ int deque_push_task(struct jobq_s *q, job_t task)
 	return 0;
 	return 0;
 }
 }
 
 
-job_t deque_pop_task(struct jobq_s *q)
+starpu_job_t deque_pop_task(struct jobq_s *q)
 {
 {
-	job_t j = NULL;
+	starpu_job_t j = NULL;
 
 
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct deque_jobq_s *deque_queue = q->queue;
 	struct deque_jobq_s *deque_queue = q->queue;
@@ -129,7 +129,7 @@ job_t deque_pop_task(struct jobq_s *q)
 	if (deque_queue->njobs > 0) 
 	if (deque_queue->njobs > 0) 
 	{
 	{
 		/* there is a task */
 		/* there is a task */
-		j = job_list_pop_front(deque_queue->jobq);
+		j = starpu_job_list_pop_front(deque_queue->jobq);
 	
 	
 		STARPU_ASSERT(j);
 		STARPU_ASSERT(j);
 		deque_queue->njobs--;
 		deque_queue->njobs--;
@@ -146,9 +146,9 @@ job_t deque_pop_task(struct jobq_s *q)
 	return j;
 	return j;
 }
 }
 
 
-struct job_list_s * deque_pop_every_task(struct jobq_s *q, uint32_t where)
+struct starpu_job_list_s * deque_pop_every_task(struct jobq_s *q, uint32_t where)
 {
 {
-	struct job_list_s *new_list, *old_list;
+	struct starpu_job_list_s *new_list, *old_list;
 
 
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct deque_jobq_s *deque_queue = q->queue;
 	struct deque_jobq_s *deque_queue = q->queue;
@@ -163,34 +163,34 @@ struct job_list_s * deque_pop_every_task(struct jobq_s *q, uint32_t where)
 	else {
 	else {
 		/* there is a task */
 		/* there is a task */
 		old_list = deque_queue->jobq;
 		old_list = deque_queue->jobq;
-		new_list = job_list_new();
+		new_list = starpu_job_list_new();
 
 
 		unsigned new_list_size = 0;
 		unsigned new_list_size = 0;
 
 
-		job_itor_t i;
-		job_t next_job;
+		starpu_job_itor_t i;
+		starpu_job_t next_job;
 		/* note that this starts at the _head_ of the list, so we put
 		/* note that this starts at the _head_ of the list, so we put
  		 * elements at the back of the new list */
  		 * elements at the back of the new list */
-		for(i = job_list_begin(old_list);
-			i != job_list_end(old_list);
+		for(i = starpu_job_list_begin(old_list);
+			i != starpu_job_list_end(old_list);
 			i  = next_job)
 			i  = next_job)
 		{
 		{
-			next_job = job_list_next(i);
+			next_job = starpu_job_list_next(i);
 
 
 			if (i->task->cl->where & where)
 			if (i->task->cl->where & where)
 			{
 			{
 				/* this elements can be moved into the new list */
 				/* this elements can be moved into the new list */
 				new_list_size++;
 				new_list_size++;
 				
 				
-				job_list_erase(old_list, i);
-				job_list_push_back(new_list, i);
+				starpu_job_list_erase(old_list, i);
+				starpu_job_list_push_back(new_list, i);
 			}
 			}
 		}
 		}
 
 
 		if (new_list_size == 0)
 		if (new_list_size == 0)
 		{
 		{
 			/* the new list is empty ... */
 			/* the new list is empty ... */
-			job_list_delete(new_list);
+			starpu_job_list_delete(new_list);
 			new_list = NULL;
 			new_list = NULL;
 		}
 		}
 		else
 		else

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

@@ -21,7 +21,7 @@
 
 
 struct deque_jobq_s {
 struct deque_jobq_s {
 	/* the actual list */
 	/* the actual list */
-	job_list_t jobq;
+	starpu_job_list_t jobq;
 
 
 	/* the number of tasks currently in the queue */
 	/* the number of tasks currently in the queue */
 	unsigned njobs;
 	unsigned njobs;
@@ -37,10 +37,10 @@ struct deque_jobq_s {
 
 
 struct jobq_s *create_deque(void);
 struct jobq_s *create_deque(void);
 
 
-int deque_push_task(struct jobq_s *q, job_t task);
-int deque_push_prio_task(struct jobq_s *q, job_t task);
+int deque_push_task(struct jobq_s *q, starpu_job_t task);
+int deque_push_prio_task(struct jobq_s *q, starpu_job_t task);
 
 
-job_t deque_pop_task(struct jobq_s *q);
+starpu_job_t deque_pop_task(struct jobq_s *q);
 
 
 void init_deque_queues_mechanisms(void);
 void init_deque_queues_mechanisms(void);
 
 

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

@@ -48,7 +48,7 @@ struct jobq_s *create_fifo(void)
 	fifo = malloc(sizeof(struct fifo_jobq_s));
 	fifo = malloc(sizeof(struct fifo_jobq_s));
 
 
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
-	fifo->jobq = job_list_new();
+	fifo->jobq = starpu_job_list_new();
 	fifo->njobs = 0;
 	fifo->njobs = 0;
 	fifo->nprocessed = 0;
 	fifo->nprocessed = 0;
 
 
@@ -61,7 +61,7 @@ struct jobq_s *create_fifo(void)
 	return jobq;
 	return jobq;
 }
 }
 
 
-int fifo_push_prio_task(struct jobq_s *q, job_t task)
+int fifo_push_prio_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 #ifndef STARPU_NO_PRIO
 #ifndef STARPU_NO_PRIO
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
@@ -77,7 +77,7 @@ int fifo_push_prio_task(struct jobq_s *q, job_t task)
 	pthread_mutex_lock(&q->activity_mutex);
 	pthread_mutex_lock(&q->activity_mutex);
 
 
 	TRACE_JOB_PUSH(task, 0);
 	TRACE_JOB_PUSH(task, 0);
-	job_list_push_back(fifo_queue->jobq, task);
+	starpu_job_list_push_back(fifo_queue->jobq, task);
 	fifo_queue->njobs++;
 	fifo_queue->njobs++;
 	fifo_queue->nprocessed++;
 	fifo_queue->nprocessed++;
 
 
@@ -90,7 +90,7 @@ int fifo_push_prio_task(struct jobq_s *q, job_t task)
 #endif
 #endif
 }
 }
 
 
-int fifo_push_task(struct jobq_s *q, job_t task)
+int fifo_push_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct fifo_jobq_s *fifo_queue = q->queue;
 	struct fifo_jobq_s *fifo_queue = q->queue;
@@ -105,7 +105,7 @@ int fifo_push_task(struct jobq_s *q, job_t task)
 	pthread_mutex_lock(&q->activity_mutex);
 	pthread_mutex_lock(&q->activity_mutex);
 
 
 	TRACE_JOB_PUSH(task, 0);
 	TRACE_JOB_PUSH(task, 0);
-	job_list_push_front(fifo_queue->jobq, task);
+	starpu_job_list_push_front(fifo_queue->jobq, task);
 	fifo_queue->njobs++;
 	fifo_queue->njobs++;
 	fifo_queue->nprocessed++;
 	fifo_queue->nprocessed++;
 
 
@@ -115,9 +115,9 @@ int fifo_push_task(struct jobq_s *q, job_t task)
 	return 0;
 	return 0;
 }
 }
 
 
-job_t fifo_pop_task(struct jobq_s *q)
+starpu_job_t fifo_pop_task(struct jobq_s *q)
 {
 {
-	job_t j = NULL;
+	starpu_job_t j = NULL;
 
 
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct fifo_jobq_s *fifo_queue = q->queue;
 	struct fifo_jobq_s *fifo_queue = q->queue;
@@ -128,7 +128,7 @@ job_t fifo_pop_task(struct jobq_s *q)
 	if (fifo_queue->njobs > 0) 
 	if (fifo_queue->njobs > 0) 
 	{
 	{
 		/* there is a task */
 		/* there is a task */
-		j = job_list_pop_back(fifo_queue->jobq);
+		j = starpu_job_list_pop_back(fifo_queue->jobq);
 	
 	
 		STARPU_ASSERT(j);
 		STARPU_ASSERT(j);
 		fifo_queue->njobs--;
 		fifo_queue->njobs--;
@@ -146,9 +146,9 @@ job_t fifo_pop_task(struct jobq_s *q)
 }
 }
 
 
 /* pop every task that can be executed on the calling driver */
 /* pop every task that can be executed on the calling driver */
-struct job_list_s * fifo_pop_every_task(struct jobq_s *q, uint32_t where)
+struct starpu_job_list_s * fifo_pop_every_task(struct jobq_s *q, uint32_t where)
 {
 {
-	struct job_list_s *new_list, *old_list;
+	struct starpu_job_list_s *new_list, *old_list;
 	unsigned size;
 	unsigned size;
 	
 	
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
@@ -163,34 +163,34 @@ struct job_list_s * fifo_pop_every_task(struct jobq_s *q, uint32_t where)
 	}
 	}
 	else {
 	else {
 		old_list = fifo_queue->jobq;
 		old_list = fifo_queue->jobq;
-		new_list = job_list_new();
+		new_list = starpu_job_list_new();
 
 
 		unsigned new_list_size = 0;
 		unsigned new_list_size = 0;
 
 
-		job_itor_t i;
-		job_t next_job;
+		starpu_job_itor_t i;
+		starpu_job_t next_job;
 		/* note that this starts at the _head_ of the list, so we put
 		/* note that this starts at the _head_ of the list, so we put
  		 * elements at the back of the new list */
  		 * elements at the back of the new list */
-		for(i = job_list_begin(old_list);
-			i != job_list_end(old_list);
+		for(i = starpu_job_list_begin(old_list);
+			i != starpu_job_list_end(old_list);
 			i  = next_job)
 			i  = next_job)
 		{
 		{
-			next_job = job_list_next(i);
+			next_job = starpu_job_list_next(i);
 
 
 			if (i->task->cl->where & where)
 			if (i->task->cl->where & where)
 			{
 			{
 				/* this elements can be moved into the new list */
 				/* this elements can be moved into the new list */
 				new_list_size++;
 				new_list_size++;
 				
 				
-				job_list_erase(old_list, i);
-				job_list_push_back(new_list, i);
+				starpu_job_list_erase(old_list, i);
+				starpu_job_list_push_back(new_list, i);
 			}
 			}
 		}
 		}
 
 
 		if (new_list_size == 0)
 		if (new_list_size == 0)
 		{
 		{
 			/* the new list is empty ... */
 			/* the new list is empty ... */
-			job_list_delete(new_list);
+			starpu_job_list_delete(new_list);
 			new_list = NULL;
 			new_list = NULL;
 		}
 		}
 		else
 		else

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

@@ -21,7 +21,7 @@
 
 
 struct fifo_jobq_s {
 struct fifo_jobq_s {
 	/* the actual list */
 	/* the actual list */
-	job_list_t jobq;
+	starpu_job_list_t jobq;
 
 
 	/* the number of tasks currently in the queue */
 	/* the number of tasks currently in the queue */
 	unsigned njobs;
 	unsigned njobs;
@@ -37,11 +37,11 @@ struct fifo_jobq_s {
 
 
 struct jobq_s *create_fifo(void);
 struct jobq_s *create_fifo(void);
 
 
-int fifo_push_task(struct jobq_s *q, job_t task);
-int fifo_push_prio_task(struct jobq_s *q, job_t task);
+int fifo_push_task(struct jobq_s *q, starpu_job_t task);
+int fifo_push_prio_task(struct jobq_s *q, starpu_job_t task);
 
 
-job_t fifo_pop_task(struct jobq_s *q);
-struct job_list_s * fifo_pop_every_task(struct jobq_s *q, uint32_t where);
+starpu_job_t fifo_pop_task(struct jobq_s *q);
+struct starpu_job_list_s * fifo_pop_every_task(struct jobq_s *q, uint32_t where);
 
 
 void init_fifo_queues_mechanisms(void);
 void init_fifo_queues_mechanisms(void);
 
 

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

@@ -56,14 +56,14 @@ struct jobq_s *create_priority_jobq(void)
 	unsigned prio;
 	unsigned prio;
 	for (prio = 0; prio < NPRIO_LEVELS; prio++)
 	for (prio = 0; prio < NPRIO_LEVELS; prio++)
 	{
 	{
-		central_queue->jobq[prio] = job_list_new();
+		central_queue->jobq[prio] = starpu_job_list_new();
 		central_queue->njobs[prio] = 0;
 		central_queue->njobs[prio] = 0;
 	}
 	}
 
 
 	return q;
 	return q;
 }
 }
 
 
-int priority_push_task(struct jobq_s *q, job_t j)
+int priority_push_task(struct jobq_s *q, starpu_job_t j)
 {
 {
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct priority_jobq_s *queue = q->queue;
 	struct priority_jobq_s *queue = q->queue;
@@ -80,7 +80,7 @@ int priority_push_task(struct jobq_s *q, job_t j)
 	
 	
 	unsigned priolevel = j->task->priority - STARPU_MIN_PRIO;
 	unsigned priolevel = j->task->priority - STARPU_MIN_PRIO;
 
 
-	job_list_push_front(queue->jobq[priolevel], j);
+	starpu_job_list_push_front(queue->jobq[priolevel], j);
 	queue->njobs[priolevel]++;
 	queue->njobs[priolevel]++;
 	queue->total_njobs++;
 	queue->total_njobs++;
 
 
@@ -90,9 +90,9 @@ int priority_push_task(struct jobq_s *q, job_t j)
 	return 0;
 	return 0;
 }
 }
 
 
-job_t priority_pop_task(struct jobq_s *q)
+starpu_job_t priority_pop_task(struct jobq_s *q)
 {
 {
-	job_t j = NULL;
+	starpu_job_t j = NULL;
 
 
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct priority_jobq_s *queue = q->queue;
 	struct priority_jobq_s *queue = q->queue;
@@ -115,7 +115,7 @@ job_t priority_pop_task(struct jobq_s *q)
 		do {
 		do {
 			if (queue->njobs[priolevel] > 0) {
 			if (queue->njobs[priolevel] > 0) {
 				/* there is some task that we can grab */
 				/* there is some task that we can grab */
-				j = job_list_pop_back(queue->jobq[priolevel]);
+				j = starpu_job_list_pop_back(queue->jobq[priolevel]);
 				queue->njobs[priolevel]--;
 				queue->njobs[priolevel]--;
 				queue->total_njobs--;
 				queue->total_njobs--;
 				TRACE_JOB_POP(j, 0);
 				TRACE_JOB_POP(j, 0);

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

@@ -26,7 +26,7 @@
 struct priority_jobq_s {
 struct priority_jobq_s {
 	/* the actual lists 
 	/* the actual lists 
 	 *	jobq[p] is for priority [p - STARPU_MIN_PRIO] */
 	 *	jobq[p] is for priority [p - STARPU_MIN_PRIO] */
-	job_list_t jobq[NPRIO_LEVELS];
+	starpu_job_list_t jobq[NPRIO_LEVELS];
 	unsigned njobs[NPRIO_LEVELS];
 	unsigned njobs[NPRIO_LEVELS];
 
 
 	unsigned total_njobs;
 	unsigned total_njobs;
@@ -35,8 +35,8 @@ struct priority_jobq_s {
 struct jobq_s *create_priority_jobq(void);
 struct jobq_s *create_priority_jobq(void);
 void init_priority_queues_mechanisms(void);
 void init_priority_queues_mechanisms(void);
 
 
-int priority_push_task(struct jobq_s *q, job_t task);
+int priority_push_task(struct jobq_s *q, starpu_job_t task);
 
 
-job_t priority_pop_task(struct jobq_s *q);
+starpu_job_t priority_pop_task(struct jobq_s *q);
 
 
 #endif // __PRIORITY_QUEUES_H__
 #endif // __PRIORITY_QUEUES_H__

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

@@ -29,9 +29,9 @@ struct jobq_s {
 	void *queue; 
 	void *queue; 
 
 
 	/* some methods to manipulate the previous queue */
 	/* some methods to manipulate the previous queue */
-	int (*push_task)(struct jobq_s *, job_t);
-	int (*push_prio_task)(struct jobq_s *, job_t);
-	struct job_s* (*pop_task)(struct jobq_s *);
+	int (*push_task)(struct jobq_s *, starpu_job_t);
+	int (*push_prio_task)(struct jobq_s *, starpu_job_t);
+	struct starpu_job_s* (*pop_task)(struct jobq_s *);
 
 
 	/* returns the number of tasks that were retrieved 
 	/* returns the number of tasks that were retrieved 
  	 * the function is reponsible for allocating the output but the driver
  	 * the function is reponsible for allocating the output but the driver
@@ -39,7 +39,7 @@ struct jobq_s {
  	 *
  	 *
  	 * NB : this function is non blocking
  	 * NB : this function is non blocking
  	 * */
  	 * */
-	struct job_list_s *(*pop_every_task)(struct jobq_s *, uint32_t);
+	struct starpu_job_list_s *(*pop_every_task)(struct jobq_s *, uint32_t);
 
 
 	/* what are the driver that may pop job from that queue ? */
 	/* what are the driver that may pop job from that queue ? */
 	uint32_t who;
 	uint32_t who;

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

@@ -48,7 +48,7 @@ struct jobq_s *create_stack(void)
 	pthread_cond_init(&jobq->activity_cond, NULL);
 	pthread_cond_init(&jobq->activity_cond, NULL);
 
 
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
-	stack->jobq = job_list_new();
+	stack->jobq = starpu_job_list_new();
 	stack->njobs = 0;
 	stack->njobs = 0;
 	stack->nprocessed = 0;
 	stack->nprocessed = 0;
 
 
@@ -84,7 +84,7 @@ unsigned get_stack_nprocessed(struct jobq_s *q)
 	return stack_queue->nprocessed;
 	return stack_queue->nprocessed;
 }
 }
 
 
-void stack_push_prio_task(struct jobq_s *q, job_t task)
+void stack_push_prio_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 #ifndef STARPU_NO_PRIO
 #ifndef STARPU_NO_PRIO
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
@@ -100,7 +100,7 @@ void stack_push_prio_task(struct jobq_s *q, job_t task)
 	pthread_mutex_lock(&q->activity_mutex);
 	pthread_mutex_lock(&q->activity_mutex);
 
 
 	TRACE_JOB_PUSH(task, 0);
 	TRACE_JOB_PUSH(task, 0);
-	job_list_push_back(stack_queue->jobq, task);
+	starpu_job_list_push_back(stack_queue->jobq, task);
 	deque_queue->njobs++;
 	deque_queue->njobs++;
 	deque_queue->nprocessed++;
 	deque_queue->nprocessed++;
 
 
@@ -111,7 +111,7 @@ void stack_push_prio_task(struct jobq_s *q, job_t task)
 #endif
 #endif
 }
 }
 
 
-void stack_push_task(struct jobq_s *q, job_t task)
+void stack_push_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct stack_jobq_s *stack_queue = q->queue;
 	struct stack_jobq_s *stack_queue = q->queue;
@@ -126,7 +126,7 @@ void stack_push_task(struct jobq_s *q, job_t task)
 	pthread_mutex_lock(&q->activity_mutex);
 	pthread_mutex_lock(&q->activity_mutex);
 
 
 	TRACE_JOB_PUSH(task, 0);
 	TRACE_JOB_PUSH(task, 0);
-	job_list_push_front(stack_queue->jobq, task);
+	starpu_job_list_push_front(stack_queue->jobq, task);
 	deque_queue->njobs++;
 	deque_queue->njobs++;
 	deque_queue->nprocessed++;
 	deque_queue->nprocessed++;
 
 
@@ -134,9 +134,9 @@ void stack_push_task(struct jobq_s *q, job_t task)
 	pthread_mutex_unlock(&q->activity_mutex);
 	pthread_mutex_unlock(&q->activity_mutex);
 }
 }
 
 
-job_t stack_pop_task(struct jobq_s *q)
+starpu_job_t stack_pop_task(struct jobq_s *q)
 {
 {
-	job_t j = NULL;
+	starpu_job_t j = NULL;
 
 
 	STARPU_ASSERT(q);
 	STARPU_ASSERT(q);
 	struct stack_jobq_s *stack_queue = q->queue;
 	struct stack_jobq_s *stack_queue = q->queue;
@@ -147,7 +147,7 @@ job_t stack_pop_task(struct jobq_s *q)
 	if (stack_queue->njobs > 0) 
 	if (stack_queue->njobs > 0) 
 	{
 	{
 		/* there is a task */
 		/* there is a task */
-		j = job_list_pop_back(stack_queue->jobq);
+		j = starpu_job_list_pop_back(stack_queue->jobq);
 	
 	
 		STARPU_ASSERT(j);
 		STARPU_ASSERT(j);
 		stack_queue->njobs--;
 		stack_queue->njobs--;

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

@@ -21,7 +21,7 @@
 
 
 struct stack_jobq_s {
 struct stack_jobq_s {
 	/* the actual list */
 	/* the actual list */
-	job_list_t jobq;
+	starpu_job_list_t jobq;
 
 
 	/* the number of tasks currently in the queue */
 	/* the number of tasks currently in the queue */
 	unsigned njobs;
 	unsigned njobs;
@@ -37,11 +37,11 @@ struct stack_jobq_s {
 
 
 struct jobq_s *create_stack(void);
 struct jobq_s *create_stack(void);
 
 
-void stack_push_task(struct jobq_s *q, job_t task);
+void stack_push_task(struct jobq_s *q, starpu_job_t task);
 
 
-void stack_push_prio_task(struct jobq_s *q, job_t task);
+void stack_push_prio_task(struct jobq_s *q, starpu_job_t task);
 
 
-job_t stack_pop_task(struct jobq_s *q);
+starpu_job_t stack_pop_task(struct jobq_s *q);
 
 
 void init_stack_queues_mechanisms(void);
 void init_stack_queues_mechanisms(void);
 
 

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

@@ -86,7 +86,7 @@ static double common_task_expected_length(struct starpu_perfmodel_t *model, uint
 	return -1.0;
 	return -1.0;
 }
 }
 
 
-double job_expected_length(uint32_t who, struct job_s *j, enum starpu_perf_archtype arch)
+double job_expected_length(uint32_t who, struct starpu_job_s *j, enum starpu_perf_archtype arch)
 {
 {
 	struct starpu_task *task = j->task;
 	struct starpu_task *task = j->task;
 	struct starpu_perfmodel_t *model = task->cl->model;
 	struct starpu_perfmodel_t *model = task->cl->model;

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

@@ -28,7 +28,7 @@
 
 
 struct starpu_buffer_descr_t;
 struct starpu_buffer_descr_t;
 struct jobq_s;
 struct jobq_s;
-struct job_s;
+struct starpu_job_s;
 enum starpu_perf_archtype;
 enum starpu_perf_archtype;
 
 
 struct starpu_history_entry_t {
 struct starpu_history_entry_t {
@@ -86,14 +86,14 @@ void _starpu_get_perf_model_dir_codelets(char *path, size_t maxlen);
 void _starpu_get_perf_model_dir_bus(char *path, size_t maxlen);
 void _starpu_get_perf_model_dir_bus(char *path, size_t maxlen);
 void _starpu_get_perf_model_dir_debug(char *path, size_t maxlen);
 void _starpu_get_perf_model_dir_debug(char *path, size_t maxlen);
 
 
-double history_based_job_expected_length(struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch, struct job_s *j);
+double history_based_job_expected_length(struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch, struct starpu_job_s *j);
 void register_model(struct starpu_perfmodel_t *model);
 void register_model(struct starpu_perfmodel_t *model);
 void dump_registered_models(void);
 void dump_registered_models(void);
 
 
-double job_expected_length(uint32_t who, struct job_s *j, enum starpu_perf_archtype arch);
+double job_expected_length(uint32_t who, struct starpu_job_s *j, enum starpu_perf_archtype arch);
 double regression_based_job_expected_length(struct starpu_perfmodel_t *model,
 double regression_based_job_expected_length(struct starpu_perfmodel_t *model,
-		uint32_t who, struct job_s *j);
-void _starpu_update_perfmodel_history(struct job_s *j, enum starpu_perf_archtype arch,
+		uint32_t who, struct starpu_job_s *j);
+void _starpu_update_perfmodel_history(struct starpu_job_s *j, enum starpu_perf_archtype arch,
 				unsigned cpuid, double measured);
 				unsigned cpuid, double measured);
 
 
 double data_expected_penalty(struct jobq_s *q, struct starpu_task *task);
 double data_expected_penalty(struct jobq_s *q, struct starpu_task *task);

+ 3 - 3
src/core/perfmodel/perfmodel_history.c

@@ -482,7 +482,7 @@ void starpu_perfmodel_debugfilepath(struct starpu_perfmodel_t *model,
 	get_model_debug_path(model, archname, path, maxlen);
 	get_model_debug_path(model, archname, path, maxlen);
 }
 }
 
 
-double regression_based_job_expected_length(struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch, struct job_s *j)
+double regression_based_job_expected_length(struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch, struct starpu_job_s *j)
 {
 {
 	double exp = -1.0;
 	double exp = -1.0;
 	size_t size = _starpu_job_get_data_size(j);
 	size_t size = _starpu_job_get_data_size(j);
@@ -499,7 +499,7 @@ double regression_based_job_expected_length(struct starpu_perfmodel_t *model, en
 	return exp;
 	return exp;
 }
 }
 
 
-double history_based_job_expected_length(struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch, struct job_s *j)
+double history_based_job_expected_length(struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch, struct starpu_job_s *j)
 {
 {
 	double exp;
 	double exp;
 	struct starpu_per_arch_perfmodel_t *per_arch_model;
 	struct starpu_per_arch_perfmodel_t *per_arch_model;
@@ -529,7 +529,7 @@ double history_based_job_expected_length(struct starpu_perfmodel_t *model, enum
 	return exp;
 	return exp;
 }
 }
 
 
-void _starpu_update_perfmodel_history(job_t j, enum starpu_perf_archtype arch, unsigned cpuid __attribute__((unused)), double measured)
+void _starpu_update_perfmodel_history(starpu_job_t j, enum starpu_perf_archtype arch, unsigned cpuid __attribute__((unused)), double measured)
 {
 {
 	struct starpu_perfmodel_t *model = j->task->cl->model;
 	struct starpu_perfmodel_t *model = j->task->cl->model;
 
 

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

@@ -24,9 +24,9 @@ static int use_prefetch = 0;
 static double alpha = 1.0;
 static double alpha = 1.0;
 static double beta = 1.0;
 static double beta = 1.0;
 
 
-static job_t dmda_pop_task(struct jobq_s *q)
+static starpu_job_t dmda_pop_task(struct jobq_s *q)
 {
 {
-	struct job_s *j;
+	struct starpu_job_s *j;
 
 
 	j = fifo_pop_task(q);
 	j = fifo_pop_task(q);
 	if (j) {
 	if (j) {
@@ -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)) , job_t j, unsigned prio)
+static int _dmda_push_task(struct jobq_s *q __attribute__ ((unused)) , starpu_job_t j, unsigned prio)
 {
 {
 	/* find the queue */
 	/* find the queue */
 	struct fifo_jobq_s *fifo;
 	struct fifo_jobq_s *fifo;
@@ -178,12 +178,12 @@ static int _dmda_push_task(struct jobq_s *q __attribute__ ((unused)) , job_t j,
 	}
 	}
 }
 }
 
 
-static int dmda_push_prio_task(struct jobq_s *q, job_t j)
+static int dmda_push_prio_task(struct jobq_s *q, starpu_job_t j)
 {
 {
 	return _dmda_push_task(q, j, 1);
 	return _dmda_push_task(q, j, 1);
 }
 }
 
 
-static int dmda_push_task(struct jobq_s *q, job_t j)
+static int dmda_push_task(struct jobq_s *q, starpu_job_t j)
 {
 {
 	if (j->task->priority == STARPU_MAX_PRIO)
 	if (j->task->priority == STARPU_MAX_PRIO)
 		return _dmda_push_task(q, j, 1);
 		return _dmda_push_task(q, j, 1);

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

@@ -22,9 +22,9 @@ static unsigned nworkers;
 static struct jobq_s *queue_array[STARPU_NMAXWORKERS];
 static struct jobq_s *queue_array[STARPU_NMAXWORKERS];
 static int use_prefetch = 0;
 static int use_prefetch = 0;
 
 
-static job_t dm_pop_task(struct jobq_s *q)
+static starpu_job_t dm_pop_task(struct jobq_s *q)
 {
 {
-	struct job_s *j;
+	struct starpu_job_s *j;
 
 
 	j = fifo_pop_task(q);
 	j = fifo_pop_task(q);
 	if (j) {
 	if (j) {
@@ -39,16 +39,16 @@ static job_t dm_pop_task(struct jobq_s *q)
 	return j;
 	return j;
 }
 }
 
 
-static struct 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 jobq_s *q, uint32_t where)
 {
 {
-	struct job_list_s *new_list;
+	struct starpu_job_list_s *new_list;
 
 
 	new_list = fifo_pop_every_task(q, where);
 	new_list = fifo_pop_every_task(q, where);
 	if (new_list) {
 	if (new_list) {
-		job_itor_t i;
-		for(i = job_list_begin(new_list);
-			i != job_list_end(new_list);
-			i = job_list_next(i))
+		starpu_job_itor_t i;
+		for(i = starpu_job_list_begin(new_list);
+			i != starpu_job_list_end(new_list);
+			i = starpu_job_list_next(i))
 		{
 		{
 			struct fifo_jobq_s *fifo = q->queue;
 			struct fifo_jobq_s *fifo = q->queue;
 			double model = i->predicted;
 			double model = i->predicted;
@@ -64,7 +64,7 @@ static struct job_list_s *dm_pop_every_task(struct jobq_s *q, uint32_t where)
 
 
 
 
 
 
-static int _dm_push_task(struct jobq_s *q __attribute__ ((unused)), job_t j, unsigned prio)
+static int _dm_push_task(struct jobq_s *q __attribute__ ((unused)), starpu_job_t j, unsigned prio)
 {
 {
 	/* find the queue */
 	/* find the queue */
 	struct fifo_jobq_s *fifo;
 	struct fifo_jobq_s *fifo;
@@ -139,12 +139,12 @@ static int _dm_push_task(struct jobq_s *q __attribute__ ((unused)), job_t j, uns
 	}
 	}
 }
 }
 
 
-static int dm_push_prio_task(struct jobq_s *q, job_t j)
+static int dm_push_prio_task(struct jobq_s *q, starpu_job_t j)
 {
 {
 	return _dm_push_task(q, j, 1);
 	return _dm_push_task(q, j, 1);
 }
 }
 
 
-static int dm_push_task(struct jobq_s *q, job_t j)
+static int dm_push_task(struct jobq_s *q, starpu_job_t j)
 {
 {
 	if (j->task->priority == STARPU_MAX_PRIO)
 	if (j->task->priority == STARPU_MAX_PRIO)
 		return _dm_push_task(q, j, 1);
 		return _dm_push_task(q, j, 1);

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

@@ -20,16 +20,16 @@
 static unsigned nworkers;
 static unsigned nworkers;
 static struct jobq_s *queue_array[32];
 static struct jobq_s *queue_array[32];
 
 
-static job_t random_pop_task(struct jobq_s *q)
+static starpu_job_t random_pop_task(struct jobq_s *q)
 {
 {
-	struct job_s *j;
+	struct starpu_job_s *j;
 
 
 	j = fifo_pop_task(q);
 	j = fifo_pop_task(q);
 
 
 	return j;
 	return j;
 }
 }
 
 
-static int _random_push_task(struct jobq_s *q __attribute__ ((unused)), job_t task, unsigned prio)
+static int _random_push_task(struct jobq_s *q __attribute__ ((unused)), starpu_job_t task, unsigned prio)
 {
 {
 	/* find the queue */
 	/* find the queue */
 	struct fifo_jobq_s *fifo;
 	struct fifo_jobq_s *fifo;
@@ -69,12 +69,12 @@ static int _random_push_task(struct jobq_s *q __attribute__ ((unused)), job_t ta
 	}
 	}
 }
 }
 
 
-static int random_push_prio_task(struct jobq_s *q, job_t task)
+static int random_push_prio_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 	return _random_push_task(q, task, 1);
 	return _random_push_task(q, task, 1);
 }
 }
 
 
-static int random_push_task(struct jobq_s *q, job_t task)
+static int random_push_task(struct jobq_s *q, starpu_job_t task)
 {
 {
 	return _random_push_task(q, task, 0);
 	return _random_push_task(q, task, 0);
 }
 }

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

@@ -183,7 +183,7 @@ void deinit_sched_policy(struct machine_config_s *config)
 }
 }
 
 
 /* the generic interface that call the proper underlying implementation */
 /* the generic interface that call the proper underlying implementation */
-int push_task(job_t j)
+int push_task(starpu_job_t j)
 {
 {
 	struct jobq_s *queue = policy.get_local_queue(&policy);
 	struct jobq_s *queue = policy.get_local_queue(&policy);
 
 
@@ -217,33 +217,33 @@ int push_task(job_t j)
 	}
 	}
 }
 }
 
 
-struct job_s * pop_task_from_queue(struct jobq_s *queue)
+struct starpu_job_s * pop_task_from_queue(struct jobq_s *queue)
 {
 {
 	STARPU_ASSERT(queue->pop_task);
 	STARPU_ASSERT(queue->pop_task);
 
 
-	struct job_s *j = queue->pop_task(queue);
+	struct starpu_job_s *j = queue->pop_task(queue);
 
 
 	return j;
 	return j;
 }
 }
 
 
-struct job_s * pop_task(void)
+struct starpu_job_s * pop_task(void)
 {
 {
 	struct jobq_s *queue = policy.get_local_queue(&policy);
 	struct jobq_s *queue = policy.get_local_queue(&policy);
 
 
 	return pop_task_from_queue(queue);
 	return pop_task_from_queue(queue);
 }
 }
 
 
-struct job_list_s * pop_every_task_from_queue(struct jobq_s *queue, uint32_t where)
+struct starpu_job_list_s * pop_every_task_from_queue(struct jobq_s *queue, uint32_t where)
 {
 {
 	STARPU_ASSERT(queue->pop_every_task);
 	STARPU_ASSERT(queue->pop_every_task);
 
 
-	struct job_list_s *list = queue->pop_every_task(queue, where);
+	struct starpu_job_list_s *list = queue->pop_every_task(queue, where);
 
 
 	return list;
 	return list;
 }
 }
 
 
 /* pop every task that can be executed on "where" (eg. GORDON) */
 /* pop every task that can be executed on "where" (eg. GORDON) */
-struct job_list_s *pop_every_task(uint32_t where)
+struct starpu_job_list_s *pop_every_task(uint32_t where)
 {
 {
 	struct jobq_s *queue = policy.get_local_queue(&policy);
 	struct jobq_s *queue = policy.get_local_queue(&policy);
 
 

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

@@ -56,11 +56,11 @@ void init_sched_policy(struct machine_config_s *config);
 void deinit_sched_policy(struct machine_config_s *config);
 void deinit_sched_policy(struct machine_config_s *config);
 //void set_local_queue(struct jobq_s *jobq);
 //void set_local_queue(struct jobq_s *jobq);
 
 
-int push_task(job_t task);
-struct job_s *pop_task(void);
-struct job_s *pop_task_from_queue(struct jobq_s *queue);
-struct job_list_s *pop_every_task(uint32_t where);
-struct job_list_s * pop_every_task_from_queue(struct jobq_s *queue, uint32_t where);
+int push_task(starpu_job_t task);
+struct starpu_job_s *pop_task(void);
+struct starpu_job_s *pop_task_from_queue(struct jobq_s *queue);
+struct starpu_job_list_s *pop_every_task(uint32_t where);
+struct starpu_job_list_s * pop_every_task_from_queue(struct jobq_s *queue, uint32_t where);
 
 
 void wait_on_sched_event(void);
 void wait_on_sched_event(void);
 
 

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

@@ -131,9 +131,9 @@ static struct jobq_s *select_workerq(void)
 
 
 #endif
 #endif
 
 
-static job_t ws_pop_task(struct jobq_s *q)
+static starpu_job_t ws_pop_task(struct jobq_s *q)
 {
 {
-	job_t j;
+	starpu_job_t j;
 
 
 	j = deque_pop_task(q);
 	j = deque_pop_task(q);
 	if (j) {
 	if (j) {

+ 8 - 8
src/core/task.c

@@ -96,7 +96,7 @@ int starpu_wait_task(struct starpu_task *task)
 	if (STARPU_UNLIKELY(!_starpu_worker_may_perform_blocking_calls()))
 	if (STARPU_UNLIKELY(!_starpu_worker_may_perform_blocking_calls()))
 		return -EDEADLK;
 		return -EDEADLK;
 
 
-	job_t j = (struct job_s *)task->starpu_private;
+	starpu_job_t j = (struct starpu_job_s *)task->starpu_private;
 
 
 	starpu_wait_job(j);
 	starpu_wait_job(j);
 
 
@@ -108,20 +108,20 @@ int starpu_wait_task(struct starpu_task *task)
 	return 0;
 	return 0;
 }
 }
 
 
-job_t _starpu_get_job_associated_to_task(struct starpu_task *task)
+starpu_job_t _starpu_get_job_associated_to_task(struct starpu_task *task)
 {
 {
 	STARPU_ASSERT(task);
 	STARPU_ASSERT(task);
 
 
 	if (!task->starpu_private)
 	if (!task->starpu_private)
 	{
 	{
-		job_t j = _starpu_job_create(task);
+		starpu_job_t j = _starpu_job_create(task);
 		task->starpu_private = j;
 		task->starpu_private = j;
 	}
 	}
 
 
-	return (struct job_s *)task->starpu_private;
+	return (struct starpu_job_s *)task->starpu_private;
 }
 }
 
 
-int _starpu_submit_job(job_t j)
+int _starpu_submit_job(starpu_job_t j)
 {
 {
 	_starpu_increment_nsubmitted_tasks();
 	_starpu_increment_nsubmitted_tasks();
 
 
@@ -161,10 +161,10 @@ int starpu_submit_task(struct starpu_task *task)
 	}
 	}
 
 
 
 
-	/* internally, StarPU manipulates a job_t which is a wrapper around a
+	/* internally, StarPU manipulates a starpu_job_t which is a wrapper around a
 	* task structure, it is possible that this job structure was already
 	* task structure, it is possible that this job structure was already
 	* allocated, for instance to enforce task depenencies. */
 	* allocated, for instance to enforce task depenencies. */
-	job_t j;
+	starpu_job_t j;
 
 
 	if (!task->starpu_private)
 	if (!task->starpu_private)
 	{
 	{
@@ -172,7 +172,7 @@ int starpu_submit_task(struct starpu_task *task)
 		task->starpu_private = j;
 		task->starpu_private = j;
 	}
 	}
 	else {
 	else {
-		j = (struct job_s *)task->starpu_private;
+		j = (struct starpu_job_s *)task->starpu_private;
 	}
 	}
 
 
 	ret = _starpu_submit_job(j);
 	ret = _starpu_submit_job(j);

+ 2 - 2
src/core/task.h

@@ -25,7 +25,7 @@
 void _starpu_increment_nsubmitted_tasks(void);
 void _starpu_increment_nsubmitted_tasks(void);
 void _starpu_decrement_nsubmitted_tasks(void);
 void _starpu_decrement_nsubmitted_tasks(void);
 
 
-int _starpu_submit_job(job_t j);
-job_t _starpu_get_job_associated_to_task(struct starpu_task *task);
+int _starpu_submit_job(starpu_job_t j);
+starpu_job_t _starpu_get_job_associated_to_task(struct starpu_task *task);
 
 
 #endif // __CORE_TASK_H__
 #endif // __CORE_TASK_H__

+ 4 - 4
src/core/workers.c

@@ -116,9 +116,9 @@ static void _starpu_init_workers(struct machine_config_s *config)
 		 * may be executed by another thread than that of the Gordon
 		 * may be executed by another thread than that of the Gordon
 		 * driver so that we cannot call the push_codelet_output method
 		 * driver so that we cannot call the push_codelet_output method
 		 * directly */
 		 * directly */
-		workerarg->terminated_jobs = job_list_new();
+		workerarg->terminated_jobs = starpu_job_list_new();
 
 
-		workerarg->local_jobs = job_list_new();
+		workerarg->local_jobs = starpu_job_list_new();
 		pthread_mutex_init(&workerarg->local_jobs_mutex, NULL);
 		pthread_mutex_init(&workerarg->local_jobs_mutex, NULL);
 	
 	
 		workerarg->status = STATUS_INITIALIZING;
 		workerarg->status = STATUS_INITIALIZING;
@@ -298,8 +298,8 @@ static void _starpu_terminate_workers(struct machine_config_s *config)
 			}
 			}
 		}
 		}
 
 
-		job_list_delete(worker->local_jobs);
-		job_list_delete(worker->terminated_jobs);
+		starpu_job_list_delete(worker->local_jobs);
+		starpu_job_list_delete(worker->terminated_jobs);
 	}
 	}
 }
 }
 
 

+ 2 - 2
src/core/workers.h

@@ -73,10 +73,10 @@ struct worker_s {
         pthread_cond_t ready_cond; /* indicate when the worker is ready */
         pthread_cond_t ready_cond; /* indicate when the worker is ready */
 	unsigned memory_node; /* which memory node is associated that worker to ? */
 	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 jobq_s *jobq; /* in which queue will that worker get/put tasks ? */
-	struct job_list_s *local_jobs; /* this queue contains tasks that have been explicitely submitted to that queue */
+	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 */
 	pthread_mutex_t local_jobs_mutex; /* protect the local_jobs list */
 	struct worker_set_s *set; /* in case this worker belongs to a set */
 	struct worker_set_s *set; /* in case this worker belongs to a set */
-	struct job_list_s *terminated_jobs; /* list of pending jobs which were executed */
+	struct starpu_job_list_s *terminated_jobs; /* list of pending jobs which were executed */
 	unsigned worker_is_running;
 	unsigned worker_is_running;
 	unsigned worker_is_initialized;
 	unsigned worker_is_initialized;
 	worker_status status; /* what is the worker doing now ? (eg. CALLBACK) */
 	worker_status status; /* what is the worker doing now ? (eg. CALLBACK) */

+ 1 - 1
src/datawizard/data_request.h

@@ -72,7 +72,7 @@ LIST_TYPE(starpu_data_requester,
 	unsigned is_requested_by_codelet;
 	unsigned is_requested_by_codelet;
 
 
 	/* in case this is a codelet that will do the access */
 	/* in case this is a codelet that will do the access */
-	struct job_s *j;
+	struct starpu_job_s *j;
 	unsigned buffer_index;
 	unsigned buffer_index;
 
 
 	/* if this is more complicated ... (eg. application request) 
 	/* if this is more complicated ... (eg. application request) 

+ 1 - 1
src/datawizard/footprint.c

@@ -17,7 +17,7 @@
 #include <datawizard/footprint.h>
 #include <datawizard/footprint.h>
 #include <common/hash.h>
 #include <common/hash.h>
 
 
-void compute_buffers_footprint(job_t j)
+void compute_buffers_footprint(starpu_job_t j)
 {
 {
 	uint32_t footprint = 0;
 	uint32_t footprint = 0;
 	unsigned buffer;
 	unsigned buffer;

+ 2 - 2
src/datawizard/footprint.h

@@ -19,9 +19,9 @@
 
 
 #include <core/jobs.h>
 #include <core/jobs.h>
 
 
-struct job_s;
+struct starpu_job_s;
 
 
-void compute_buffers_footprint(struct job_s *j);
+void compute_buffers_footprint(struct starpu_job_s *j);
 inline uint32_t compute_data_footprint(starpu_data_handle handle);
 inline uint32_t compute_data_footprint(starpu_data_handle handle);
 
 
 #endif // __FOOTPRINT_H__
 #endif // __FOOTPRINT_H__

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

@@ -20,7 +20,7 @@
 #include "driver_cpu.h"
 #include "driver_cpu.h"
 #include <core/policies/sched_policy.h>
 #include <core/policies/sched_policy.h>
 
 
-static int execute_job_on_cpu(job_t j, struct worker_s *cpu_args)
+static int execute_job_on_cpu(starpu_job_t j, struct worker_s *cpu_args)
 {
 {
 	int ret;
 	int ret;
 	tick_t codelet_start, codelet_end;
 	tick_t codelet_start, codelet_end;
@@ -136,7 +136,7 @@ void *_starpu_cpu_worker(void *arg)
 	pthread_cond_signal(&cpu_arg->ready_cond);
 	pthread_cond_signal(&cpu_arg->ready_cond);
 	pthread_mutex_unlock(&cpu_arg->mutex);
 	pthread_mutex_unlock(&cpu_arg->mutex);
 
 
-        job_t j;
+        starpu_job_t j;
 	int res;
 	int res;
 
 
 	struct sched_policy_s *policy = get_sched_policy();
 	struct sched_policy_s *policy = get_sched_policy();

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

@@ -77,7 +77,7 @@ void _starpu_init_cuda(void)
 	assert(ncudagpus <= STARPU_MAXCUDADEVS);
 	assert(ncudagpus <= STARPU_MAXCUDADEVS);
 }
 }
 
 
-static int execute_job_on_cuda(job_t j, struct worker_s *args)
+static int execute_job_on_cuda(starpu_job_t j, struct worker_s *args)
 {
 {
 	int ret;
 	int ret;
 //	uint32_t mask = (1<<0);
 //	uint32_t mask = (1<<0);
@@ -218,7 +218,7 @@ void *_starpu_cuda_worker(void *arg)
 	pthread_cond_signal(&args->ready_cond);
 	pthread_cond_signal(&args->ready_cond);
 	pthread_mutex_unlock(&args->mutex);
 	pthread_mutex_unlock(&args->mutex);
 
 
-	struct job_s * j;
+	struct starpu_job_s * j;
 	int res;
 	int res;
 
 
 	struct sched_policy_s *policy = get_sched_policy();
 	struct sched_policy_s *policy = get_sched_policy();

+ 20 - 20
src/drivers/gordon/driver_gordon.c

@@ -35,10 +35,10 @@ struct gordon_task_wrapper_s {
 	/* who has executed that ? */
 	/* who has executed that ? */
 	struct worker_s *worker;
 	struct worker_s *worker;
 
 
-	struct job_list_s *list;	/* StarPU */
+	struct starpu_job_list_s *list;	/* StarPU */
 	struct gordon_ppu_job_s *gordon_job; /* gordon*/
 	struct gordon_ppu_job_s *gordon_job; /* gordon*/
 
 
-	struct job_s *j; /* if there is a single task */
+	struct starpu_job_s *j; /* if there is a single task */
 
 
 	/* debug */
 	/* debug */
 	unsigned terminated;
 	unsigned terminated;
@@ -75,7 +75,7 @@ void *gordon_worker_progress(void *arg)
 	return NULL;
 	return NULL;
 }
 }
 
 
-static void starpu_to_gordon_buffers(job_t j, struct gordon_ppu_job_s *gordon_job, uint32_t memory_node)
+static void starpu_to_gordon_buffers(starpu_job_t j, struct gordon_ppu_job_s *gordon_job, uint32_t memory_node)
 {
 {
 	unsigned buffer;
 	unsigned buffer;
 	unsigned nin = 0, ninout = 0, nout = 0;
 	unsigned nin = 0, ninout = 0, nout = 0;
@@ -149,7 +149,7 @@ static void starpu_to_gordon_buffers(job_t j, struct gordon_ppu_job_s *gordon_jo
 
 
 /* we assume the data are already available so that the data interface fields are 
 /* we assume the data are already available so that the data interface fields are 
  * already filled */
  * already filled */
-static struct gordon_task_wrapper_s *starpu_to_gordon_job(job_t j)
+static struct gordon_task_wrapper_s *starpu_to_gordon_job(starpu_job_t j)
 {
 {
 	struct gordon_ppu_job_s *gordon_job = gordon_alloc_jobs(1, 0);
 	struct gordon_ppu_job_s *gordon_job = gordon_alloc_jobs(1, 0);
 	struct gordon_task_wrapper_s *task_wrapper =
 	struct gordon_task_wrapper_s *task_wrapper =
@@ -168,7 +168,7 @@ static struct gordon_task_wrapper_s *starpu_to_gordon_job(job_t j)
 	return task_wrapper;
 	return task_wrapper;
 }
 }
 
 
-static void handle_terminated_job(job_t j)
+static void handle_terminated_job(starpu_job_t j)
 {
 {
 	starpu_push_task_output(j->task, 0);
 	starpu_push_task_output(j->task, 0);
 	_starpu_handle_job_termination(j);
 	_starpu_handle_job_termination(j);
@@ -178,7 +178,7 @@ static void handle_terminated_job(job_t j)
 static void gordon_callback_list_func(void *arg)
 static void gordon_callback_list_func(void *arg)
 {
 {
 	struct gordon_task_wrapper_s *task_wrapper = arg; 
 	struct gordon_task_wrapper_s *task_wrapper = arg; 
-	struct job_list_s *wrapper_list; 
+	struct starpu_job_list_s *wrapper_list; 
 
 
 	/* we don't know who will execute that codelet : so we actually defer the
 	/* we don't know who will execute that codelet : so we actually defer the
  	 * execution of the StarPU codelet and the job termination later */
  	 * execution of the StarPU codelet and the job termination later */
@@ -194,9 +194,9 @@ static void gordon_callback_list_func(void *arg)
 	unsigned task_cnt = 0;
 	unsigned task_cnt = 0;
 
 
 	/* XXX 0 was hardcoded */
 	/* XXX 0 was hardcoded */
-	while (!job_list_empty(wrapper_list))
+	while (!starpu_job_list_empty(wrapper_list))
 	{
 	{
-		job_t j = job_list_pop_back(wrapper_list);
+		starpu_job_t j = starpu_job_list_pop_back(wrapper_list);
 
 
 		struct gordon_ppu_job_s * gordon_task = &task_wrapper->gordon_job[task_cnt];
 		struct gordon_ppu_job_s * gordon_task = &task_wrapper->gordon_job[task_cnt];
 		struct starpu_perfmodel_t *model = j->task->cl->model;
 		struct starpu_perfmodel_t *model = j->task->cl->model;
@@ -216,7 +216,7 @@ static void gordon_callback_list_func(void *arg)
 	}
 	}
 
 
 	/* the job list was allocated by the gordon driver itself */
 	/* the job list was allocated by the gordon driver itself */
-	job_list_delete(wrapper_list);
+	starpu_job_list_delete(wrapper_list);
 
 
 	starpu_wake_all_blocked_workers();
 	starpu_wake_all_blocked_workers();
 	free(task_wrapper->gordon_job);
 	free(task_wrapper->gordon_job);
@@ -243,7 +243,7 @@ static void gordon_callback_func(void *arg)
 	free(task_wrapper);
 	free(task_wrapper);
 }
 }
 
 
-int inject_task(job_t j, struct worker_s *worker)
+int inject_task(starpu_job_t j, struct worker_s *worker)
 {
 {
 	struct starpu_task *task = j->task;
 	struct starpu_task *task = j->task;
 	int ret = _starpu_fetch_task_input(task, 0);
 	int ret = _starpu_fetch_task_input(task, 0);
@@ -263,16 +263,16 @@ int inject_task(job_t j, struct worker_s *worker)
 	return 0;
 	return 0;
 }
 }
 
 
-int inject_task_list(struct job_list_s *list, struct worker_s *worker)
+int inject_task_list(struct starpu_job_list_s *list, struct worker_s *worker)
 {
 {
 	/* first put back all tasks that can not be performed by Gordon */
 	/* first put back all tasks that can not be performed by Gordon */
 	unsigned nvalids = 0;
 	unsigned nvalids = 0;
 	unsigned ninvalids = 0;
 	unsigned ninvalids = 0;
-	job_t j;
+	starpu_job_t j;
 
 
 	// TODO !
 	// TODO !
 //	
 //	
-//	for (j = job_list_begin(list); j != job_list_end(list); j = job_list_next(j) )
+//	for (j = starpu_job_list_begin(list); j != starpu_job_list_end(list); j = starpu_job_list_next(j) )
 //	{
 //	{
 //		if (!STARPU_GORDON_MAY_PERFORM(j)) {
 //		if (!STARPU_GORDON_MAY_PERFORM(j)) {
 //			// XXX TODO
 //			// XXX TODO
@@ -299,7 +299,7 @@ int inject_task_list(struct job_list_s *list, struct worker_s *worker)
 	task_wrapper->worker = worker;
 	task_wrapper->worker = worker;
 	
 	
 	unsigned index;
 	unsigned index;
-	for (j = job_list_begin(list), index = 0; j != job_list_end(list); j = job_list_next(j), index++)
+	for (j = starpu_job_list_begin(list), index = 0; j != starpu_job_list_end(list); j = starpu_job_list_next(j), index++)
 	{
 	{
 		int ret;
 		int ret;
 
 
@@ -337,7 +337,7 @@ void *gordon_worker_inject(struct worker_set_s *arg)
 			int ret = 0;
 			int ret = 0;
 #warning we should look into the local job list here !
 #warning we should look into the local job list here !
 
 
-			struct job_list_s *list = pop_every_task(STARPU_GORDON);
+			struct starpu_job_list_s *list = pop_every_task(STARPU_GORDON);
 			/* XXX 0 is hardcoded */
 			/* XXX 0 is hardcoded */
 			if (list)
 			if (list)
 			{
 			{
@@ -352,20 +352,20 @@ void *gordon_worker_inject(struct worker_set_s *arg)
 				unsigned chunk;
 				unsigned chunk;
 				for (chunk = 0; chunk < nchunks; chunk++)
 				for (chunk = 0; chunk < nchunks; chunk++)
 				{
 				{
-					struct job_list_s *chunk_list;
+					struct starpu_job_list_s *chunk_list;
 					if (chunk != (nchunks -1))
 					if (chunk != (nchunks -1))
 					{
 					{
 						/* split the list in 2 parts : list = chunk_list | tail */
 						/* split the list in 2 parts : list = chunk_list | tail */
-						chunk_list = job_list_new();
+						chunk_list = starpu_job_list_new();
 
 
 						/* find the end */
 						/* find the end */
 						chunk_list->_head = list->_head;
 						chunk_list->_head = list->_head;
 
 
-						job_itor_t it_j = job_list_begin(list);
+						starpu_job_itor_t it_j = starpu_job_list_begin(list);
 						unsigned ind;
 						unsigned ind;
 						for (ind = 0; ind < chunksize; ind++)
 						for (ind = 0; ind < chunksize; ind++)
 						{
 						{
-							it_j = job_list_next(it_j);
+							it_j = starpu_job_list_next(it_j);
 						}
 						}
 
 
 						/* it_j should be the first element of the new list (tail) */
 						/* it_j should be the first element of the new list (tail) */
@@ -387,7 +387,7 @@ void *gordon_worker_inject(struct worker_set_s *arg)
 			}
 			}
 #else
 #else
 			/* gordon should accept a little more work */
 			/* gordon should accept a little more work */
-			job_t j;
+			starpu_job_t j;
 			j =  pop_task();
 			j =  pop_task();
 	//		fprintf(stderr, "pop task %p\n", j);
 	//		fprintf(stderr, "pop task %p\n", j);
 			if (j) {
 			if (j) {