Kaynağa Gözat

src: rename internal types following coding conventions

Nathalie Furmento 13 yıl önce
ebeveyn
işleme
0bd2fe9020

+ 3 - 3
src/core/combined_workers.c

@@ -57,7 +57,7 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 	int new_workerid;
 
 	/* Return the number of actual workers. */
-	struct starpu_machine_config_s *config = _starpu_get_machine_config();
+	struct _starpu_machine_config *config = _starpu_get_machine_config();
 
 	int basic_worker_count = (int)config->topology.nworkers;
 	int combined_worker_id = (int)config->topology.ncombinedworkers;
@@ -95,7 +95,7 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 	fprintf(stderr, "into worker %d\n", new_workerid);
 #endif
 
-	struct starpu_combined_worker_s *combined_worker =
+	struct _starpu_combined_worker *combined_worker =
 		&config->combined_workers[combined_worker_id];
 
 	combined_worker->worker_size = nworkers;
@@ -153,7 +153,7 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 int starpu_combined_worker_get_description(int workerid, int *worker_size, int **combined_workerid)
 {
 	/* Check that this is the id of a combined worker */
-	struct starpu_combined_worker_s *worker;
+	struct _starpu_combined_worker *worker;
 	worker = _starpu_get_combined_worker_struct(workerid);
 	STARPU_ASSERT(worker);
 

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

@@ -22,7 +22,7 @@
 #include <core/dependencies/cg.h>
 #include <core/dependencies/tags.h>
 
-void _starpu_cg_list_init(struct starpu_cg_list_s *list)
+void _starpu_cg_list_init(struct _starpu_cg_list *list)
 {
 	list->nsuccs = 0;
 	list->ndeps = 0;
@@ -32,16 +32,16 @@ void _starpu_cg_list_init(struct starpu_cg_list_s *list)
 	/* this is a small initial default value ... may be changed */
 	list->succ_list_size = 0;
 	list->succ =
-		(struct starpu_cg_s **) realloc(NULL, list->succ_list_size*sizeof(struct starpu_cg_s *));
+		(struct _starpu_cg **) realloc(NULL, list->succ_list_size*sizeof(struct _starpu_cg *));
 #endif
 }
 
-void _starpu_cg_list_deinit(struct starpu_cg_list_s *list)
+void _starpu_cg_list_deinit(struct _starpu_cg_list *list)
 {
 	unsigned id;
 	for (id = 0; id < list->nsuccs; id++)
 	{
-		starpu_cg_t *cg = list->succ[id];
+		struct _starpu_cg *cg = list->succ[id];
 
 		/* We remove the reference on the completion group, and free it
 		 * if there is no more reference. */		
@@ -55,7 +55,7 @@ void _starpu_cg_list_deinit(struct starpu_cg_list_s *list)
 #endif
 }
 
-void _starpu_add_successor_to_cg_list(struct starpu_cg_list_s *successors, starpu_cg_t *cg)
+void _starpu_add_successor_to_cg_list(struct _starpu_cg_list *successors, struct _starpu_cg *cg)
 {
 	STARPU_ASSERT(cg);
 
@@ -72,8 +72,8 @@ void _starpu_add_successor_to_cg_list(struct starpu_cg_list_s *successors, starp
 			successors->succ_list_size = 4;
 
 		/* NB: this is thread safe as the tag->lock is taken */
-		successors->succ = (struct starpu_cg_s **) realloc(successors->succ, 
-			successors->succ_list_size*sizeof(struct starpu_cg_s *));
+		successors->succ = (struct _starpu_cg **) realloc(successors->succ, 
+			successors->succ_list_size*sizeof(struct _starpu_cg *));
 	}
 #else
 	STARPU_ASSERT(index < STARPU_NMAXDEPS);
@@ -81,7 +81,7 @@ void _starpu_add_successor_to_cg_list(struct starpu_cg_list_s *successors, starp
 	successors->succ[index] = cg;
 }
 
-void _starpu_notify_cg(starpu_cg_t *cg)
+void _starpu_notify_cg(struct _starpu_cg *cg)
 {
 	STARPU_ASSERT(cg);
 	unsigned remaining = STARPU_ATOMIC_ADD(&cg->remaining, -1);
@@ -89,8 +89,8 @@ void _starpu_notify_cg(starpu_cg_t *cg)
 	if (remaining == 0) {
 		cg->remaining = cg->ntags;
 
-		struct starpu_tag_s *tag;
-		struct starpu_cg_list_s *tag_successors, *job_successors;
+		struct _starpu_tag *tag;
+		struct _starpu_cg_list *tag_successors, *job_successors;
 		starpu_job_t j;
 
 		/* the group is now completed */
@@ -148,7 +148,7 @@ void _starpu_notify_cg(starpu_cg_t *cg)
 	}
 }
 
-void _starpu_notify_cg_list(struct starpu_cg_list_s *successors)
+void _starpu_notify_cg_list(struct _starpu_cg_list *successors)
 {
 	unsigned nsuccs;
 	unsigned succ;
@@ -157,10 +157,10 @@ void _starpu_notify_cg_list(struct starpu_cg_list_s *successors)
 
 	for (succ = 0; succ < nsuccs; succ++)
 	{
-		struct starpu_cg_s *cg = successors->succ[succ];
+		struct _starpu_cg *cg = successors->succ[succ];
 		STARPU_ASSERT(cg);
 
-		struct starpu_tag_s *cgtag = NULL;
+		struct _starpu_tag *cgtag = NULL;
 
 		unsigned cg_type = cg->cg_type;
 

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

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -32,15 +32,15 @@
 #endif
 
 /* Completion Group list */
-struct starpu_cg_list_s {
+struct _starpu_cg_list {
 	unsigned nsuccs; /* how many successors ? */
 	unsigned ndeps; /* how many deps ? */
 	unsigned ndeps_completed; /* how many deps are done ? */
 #ifdef STARPU_DYNAMIC_DEPS_SIZE
 	unsigned succ_list_size;
-	struct starpu_cg_s **succ;
+	struct _starpu_cg **succ;
 #else
-	struct starpu_cg_s *succ[STARPU_NMAXDEPS];
+	struct _starpu_cg *succ[STARPU_NMAXDEPS];
 #endif
 };
 
@@ -49,7 +49,7 @@ struct starpu_cg_list_s {
 #define STARPU_CG_TASK	(1<<2)
 
 /* Completion Group */
-typedef struct starpu_cg_s {
+struct _starpu_cg {
 	unsigned ntags; /* number of tags depended on */
 	unsigned remaining; /* number of remaining tags */
 
@@ -57,7 +57,7 @@ typedef struct starpu_cg_s {
 
 	union {
 		/* STARPU_CG_TAG */
-		struct starpu_tag_s *tag;
+		struct _starpu_tag *tag;
 
 		/* STARPU_CG_TASK */
 		struct starpu_job_s *job;
@@ -72,13 +72,13 @@ typedef struct starpu_cg_s {
 			pthread_cond_t cg_cond;
 		} succ_apps;
 	} succ;
-} starpu_cg_t;
+};
 
-void _starpu_cg_list_init(struct starpu_cg_list_s *list);
-void _starpu_cg_list_deinit(struct starpu_cg_list_s *list);
-void _starpu_add_successor_to_cg_list(struct starpu_cg_list_s *successors, starpu_cg_t *cg);
-void _starpu_notify_cg(starpu_cg_t *cg);
-void _starpu_notify_cg_list(struct starpu_cg_list_s *successors);
+void _starpu_cg_list_init(struct _starpu_cg_list *list);
+void _starpu_cg_list_deinit(struct _starpu_cg_list *list);
+void _starpu_add_successor_to_cg_list(struct _starpu_cg_list *successors, struct _starpu_cg *cg);
+void _starpu_notify_cg(struct _starpu_cg *cg);
+void _starpu_notify_cg_list(struct _starpu_cg_list *successors);
 void _starpu_notify_task_dependencies(struct starpu_job_s *j);
 
 #endif // __CG_H__

+ 10 - 10
src/core/dependencies/htable.c

@@ -18,10 +18,10 @@
 #include <core/dependencies/htable.h>
 #include <string.h>
 
-void *_starpu_htbl_search_tag(starpu_htbl_node_t *htbl, starpu_tag_t tag)
+void *_starpu_htbl_search_tag(struct _starpu_htbl_node *htbl, starpu_tag_t tag)
 {
 	unsigned currentbit;
-	starpu_htbl_node_t *current_htbl = htbl;
+	struct _starpu_htbl_node *current_htbl = htbl;
 
 	/* 000000000001111 with STARPU_HTBL_NODE_SIZE 1's */
 	starpu_tag_t mask = (1<<STARPU_HTBL_NODE_SIZE)-1;
@@ -55,12 +55,12 @@ void *_starpu_htbl_search_tag(starpu_htbl_node_t *htbl, starpu_tag_t tag)
  * returns the previous value of the tag, or NULL else
  */
 
-void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void *entry)
+void *_starpu_htbl_insert_tag(struct _starpu_htbl_node **htbl, starpu_tag_t tag, void *entry)
 {
 
 	unsigned currentbit;
-	starpu_htbl_node_t **current_htbl_ptr = htbl;
-	starpu_htbl_node_t *previous_htbl_ptr = NULL;
+	struct _starpu_htbl_node **current_htbl_ptr = htbl;
+	struct _starpu_htbl_node *previous_htbl_ptr = NULL;
 
 	/* 000000000001111 with STARPU_HTBL_NODE_SIZE 1's */
 	starpu_tag_t mask = (1<<STARPU_HTBL_NODE_SIZE)-1;
@@ -69,7 +69,7 @@ void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void
 	{
 		if (*current_htbl_ptr == NULL) {
 			/* TODO pad to change that 1 into 16 ? */
-			*current_htbl_ptr = (starpu_htbl_node_t *) calloc(1, sizeof(starpu_htbl_node_t));
+			*current_htbl_ptr = (struct _starpu_htbl_node *) calloc(1, sizeof(struct _starpu_htbl_node));
 			assert(*current_htbl_ptr);
 
 			if (previous_htbl_ptr)
@@ -97,7 +97,7 @@ void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void
 	/* current_htbl either contains NULL or a previous entry 
 	 * we overwrite it anyway */
 	void *old_entry = *current_htbl_ptr;
-	*current_htbl_ptr = (starpu_htbl_node_t *) entry;
+	*current_htbl_ptr = (struct _starpu_htbl_node *) entry;
 
 	if (!old_entry)
 		previous_htbl_ptr->nentries++;
@@ -106,14 +106,14 @@ void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void
 }
 
 /* returns the entry corresponding to the tag and remove it from the htbl */
-void *_starpu_htbl_remove_tag(starpu_htbl_node_t *htbl, starpu_tag_t tag)
+void *_starpu_htbl_remove_tag(struct _starpu_htbl_node *htbl, starpu_tag_t tag)
 {
 	/* NB : if the entry is "NULL", we assume this means it is not present XXX */
 	unsigned currentbit;
-	starpu_htbl_node_t *current_htbl_ptr = htbl;
+	struct _starpu_htbl_node *current_htbl_ptr = htbl;
 
 	/* remember the path to the tag */
-	starpu_htbl_node_t *path[(STARPU_TAG_SIZE + STARPU_HTBL_NODE_SIZE - 1)/(STARPU_HTBL_NODE_SIZE)];
+	struct _starpu_htbl_node *path[(STARPU_TAG_SIZE + STARPU_HTBL_NODE_SIZE - 1)/(STARPU_HTBL_NODE_SIZE)];
 
 	/* 000000000001111 with STARPU_HTBL_NODE_SIZE 1's */
 	starpu_tag_t mask = (1<<STARPU_HTBL_NODE_SIZE)-1;

+ 7 - 7
src/core/dependencies/htable.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -30,14 +30,14 @@
 
 #define STARPU_HTBL_NODE_SIZE	16
 
-typedef struct starpu_htbl_node_s {
+struct _starpu_htbl_node {
 	unsigned nentries;
-	struct starpu_htbl_node_s *children[1<<STARPU_HTBL_NODE_SIZE];
-} starpu_htbl_node_t;
+	struct _starpu_htbl_node *children[1<<STARPU_HTBL_NODE_SIZE];
+};
 
-void *_starpu_htbl_search_tag(starpu_htbl_node_t *htbl, starpu_tag_t tag);
-void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void *entry);
-void *_starpu_htbl_remove_tag(starpu_htbl_node_t *htbl, starpu_tag_t tag);
+void *_starpu_htbl_search_tag(struct _starpu_htbl_node *htbl, starpu_tag_t tag);
+void *_starpu_htbl_insert_tag(struct _starpu_htbl_node **htbl, starpu_tag_t tag, void *entry);
+void *_starpu_htbl_remove_tag(struct _starpu_htbl_node *htbl, starpu_tag_t tag);
 
 
 #endif

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

@@ -25,12 +25,12 @@
 #include <core/dependencies/data_concurrency.h>
 #include <profiling/bound.h>
 
-static starpu_htbl_node_t *tag_htbl = NULL;
+static struct _starpu_htbl_node *tag_htbl = NULL;
 static pthread_rwlock_t tag_global_rwlock = PTHREAD_RWLOCK_INITIALIZER;
 
-static starpu_cg_t *create_cg_apps(unsigned ntags)
+static struct _starpu_cg *create_cg_apps(unsigned ntags)
 {
-	starpu_cg_t *cg = (starpu_cg_t *) malloc(sizeof(starpu_cg_t));
+	struct _starpu_cg *cg = (struct _starpu_cg *) malloc(sizeof(struct _starpu_cg));
 	STARPU_ASSERT(cg);
 
 	cg->ntags = ntags;
@@ -45,9 +45,9 @@ static starpu_cg_t *create_cg_apps(unsigned ntags)
 }
 
 
-static starpu_cg_t *create_cg_tag(unsigned ntags, struct starpu_tag_s *tag)
+static struct _starpu_cg *create_cg_tag(unsigned ntags, struct _starpu_tag *tag)
 {
-	starpu_cg_t *cg = (starpu_cg_t *) malloc(sizeof(starpu_cg_t));
+	struct _starpu_cg *cg = (struct _starpu_cg *) malloc(sizeof(struct _starpu_cg));
 	STARPU_ASSERT(cg);
 
 	cg->ntags = ntags;
@@ -60,10 +60,10 @@ static starpu_cg_t *create_cg_tag(unsigned ntags, struct starpu_tag_s *tag)
 	return cg;
 }
 
-static struct starpu_tag_s *_starpu_tag_init(starpu_tag_t id)
+static struct _starpu_tag *_starpu_tag_init(starpu_tag_t id)
 {
-	struct starpu_tag_s *tag;
-	tag = (struct starpu_tag_s *) malloc(sizeof(struct starpu_tag_s));
+	struct _starpu_tag *tag;
+	tag = (struct _starpu_tag *) malloc(sizeof(struct _starpu_tag));
 	STARPU_ASSERT(tag);
 
 	tag->job = NULL;
@@ -82,11 +82,11 @@ static struct starpu_tag_s *_starpu_tag_init(starpu_tag_t id)
 
 void starpu_tag_remove(starpu_tag_t id)
 {
-	struct starpu_tag_s *tag;
+	struct _starpu_tag *tag;
 
 	pthread_rwlock_wrlock(&tag_global_rwlock);
 
-	tag = (struct starpu_tag_s *) _starpu_htbl_remove_tag(tag_htbl, id);
+	tag = (struct _starpu_tag *) _starpu_htbl_remove_tag(tag_htbl, id);
 
 	pthread_rwlock_unlock(&tag_global_rwlock);
 
@@ -98,7 +98,7 @@ void starpu_tag_remove(starpu_tag_t id)
 
 		for (succ = 0; succ < nsuccs; succ++)
 		{
-			struct starpu_cg_s *cg = tag->tag_successors.succ[succ];
+			struct _starpu_cg *cg = tag->tag_successors.succ[succ];
 
 			unsigned ntags = STARPU_ATOMIC_ADD(&cg->ntags, -1);
 			unsigned remaining __attribute__ ((unused)) = STARPU_ATOMIC_ADD(&cg->remaining, -1);
@@ -118,13 +118,13 @@ void starpu_tag_remove(starpu_tag_t id)
 	free(tag);
 }
 
-static struct starpu_tag_s *gettag_struct(starpu_tag_t id)
+static struct _starpu_tag *gettag_struct(starpu_tag_t id)
 {
 	pthread_rwlock_wrlock(&tag_global_rwlock);
 
 	/* search if the tag is already declared or not */
-	struct starpu_tag_s *tag;
-	tag = (struct starpu_tag_s *) _starpu_htbl_search_tag(tag_htbl, id);
+	struct _starpu_tag *tag;
+	tag = (struct _starpu_tag *) _starpu_htbl_search_tag(tag_htbl, id);
 
 	if (tag == NULL) {
 		/* the tag does not exist yet : create an entry */
@@ -142,7 +142,7 @@ static struct starpu_tag_s *gettag_struct(starpu_tag_t id)
 }
 
 /* lock should be taken */
-void _starpu_tag_set_ready(struct starpu_tag_s *tag)
+void _starpu_tag_set_ready(struct _starpu_tag *tag)
 {
 	/* mark this tag as ready to run */
 	tag->state = STARPU_READY;
@@ -166,7 +166,7 @@ void _starpu_tag_set_ready(struct starpu_tag_s *tag)
 }
 
 /* the lock must be taken ! */
-static void _starpu_tag_add_succ(struct starpu_tag_s *tag, starpu_cg_t *cg)
+static void _starpu_tag_add_succ(struct _starpu_tag *tag, struct _starpu_cg *cg)
 {
 	STARPU_ASSERT(tag);
 
@@ -178,7 +178,7 @@ static void _starpu_tag_add_succ(struct starpu_tag_s *tag, starpu_cg_t *cg)
 	}
 }
 
-void _starpu_notify_tag_dependencies(struct starpu_tag_s *tag)
+void _starpu_notify_tag_dependencies(struct _starpu_tag *tag)
 {
 	_starpu_spin_lock(&tag->lock);
 
@@ -192,7 +192,7 @@ void _starpu_notify_tag_dependencies(struct starpu_tag_s *tag)
 
 void starpu_tag_notify_from_apps(starpu_tag_t id)
 {
-	struct starpu_tag_s *tag = gettag_struct(id);
+	struct _starpu_tag *tag = gettag_struct(id);
 
 	_starpu_notify_tag_dependencies(tag);
 }
@@ -202,7 +202,7 @@ void _starpu_tag_declare(starpu_tag_t id, struct starpu_job_s *job)
 	STARPU_TRACE_TAG(id, job);
 	job->task->use_tag = 1;
 	
-	struct starpu_tag_s *tag= gettag_struct(id);
+	struct _starpu_tag *tag= gettag_struct(id);
 	tag->job = job;
 	tag->is_assigned = 1;
 	
@@ -219,11 +219,11 @@ void starpu_tag_declare_deps_array(starpu_tag_t id, unsigned ndeps, starpu_tag_t
 	unsigned i;
 
 	/* create the associated completion group */
-	struct starpu_tag_s *tag_child = gettag_struct(id);
+	struct _starpu_tag *tag_child = gettag_struct(id);
 
 	_starpu_spin_lock(&tag_child->lock);
 
-	starpu_cg_t *cg = create_cg_tag(ndeps, tag_child);
+	struct _starpu_cg *cg = create_cg_tag(ndeps, tag_child);
 
 	STARPU_ASSERT(ndeps != 0);
 	
@@ -235,7 +235,7 @@ void starpu_tag_declare_deps_array(starpu_tag_t id, unsigned ndeps, starpu_tag_t
 		 * so cg should be among dep_id's successors*/
 		STARPU_TRACE_TAG_DEPS(id, dep_id);
 		_starpu_bound_tag_dep(id, dep_id);
-		struct starpu_tag_s *tag_dep = gettag_struct(dep_id);
+		struct _starpu_tag *tag_dep = gettag_struct(dep_id);
 		STARPU_ASSERT(tag_dep != tag_child);
 		_starpu_spin_lock(&tag_dep->lock);
 		_starpu_tag_add_succ(tag_dep, cg);
@@ -250,11 +250,11 @@ void starpu_tag_declare_deps(starpu_tag_t id, unsigned ndeps, ...)
 	unsigned i;
 	
 	/* create the associated completion group */
-	struct starpu_tag_s *tag_child = gettag_struct(id);
+	struct _starpu_tag *tag_child = gettag_struct(id);
 
 	_starpu_spin_lock(&tag_child->lock);
 
-	starpu_cg_t *cg = create_cg_tag(ndeps, tag_child);
+	struct _starpu_cg *cg = create_cg_tag(ndeps, tag_child);
 
 	STARPU_ASSERT(ndeps != 0);
 	
@@ -269,7 +269,7 @@ void starpu_tag_declare_deps(starpu_tag_t id, unsigned ndeps, ...)
 		 * so cg should be among dep_id's successors*/
 		STARPU_TRACE_TAG_DEPS(id, dep_id);
 		_starpu_bound_tag_dep(id, dep_id);
-		struct starpu_tag_s *tag_dep = gettag_struct(dep_id);
+		struct _starpu_tag *tag_dep = gettag_struct(dep_id);
 		STARPU_ASSERT(tag_dep != tag_child);
 		_starpu_spin_lock(&tag_dep->lock);
 		_starpu_tag_add_succ(tag_dep, cg);
@@ -286,7 +286,7 @@ int starpu_tag_wait_array(unsigned ntags, starpu_tag_t *id)
 	unsigned i;
 	unsigned current;
 
-	struct starpu_tag_s *tag_array[ntags];
+	struct _starpu_tag *tag_array[ntags];
 
 	_STARPU_LOG_IN();
 
@@ -299,7 +299,7 @@ int starpu_tag_wait_array(unsigned ntags, starpu_tag_t *id)
 	/* only wait the tags that are not done yet */
 	for (i = 0, current = 0; i < ntags; i++)
 	{
-		struct starpu_tag_s *tag = gettag_struct(id[i]);
+		struct _starpu_tag *tag = gettag_struct(id[i]);
 		
 		_starpu_spin_lock(&tag->lock);
 
@@ -323,7 +323,7 @@ int starpu_tag_wait_array(unsigned ntags, starpu_tag_t *id)
 	}
 	
 	/* there is at least one task that is not finished */
-	starpu_cg_t *cg = create_cg_apps(current);
+	struct _starpu_cg *cg = create_cg_apps(current);
 
 	for (i = 0; i < current; i++)
 	{

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

@@ -25,7 +25,7 @@
 
 #define STARPU_TAG_SIZE        (sizeof(starpu_tag_t)*8)
 
-typedef enum {
+enum _starpu_tag_state {
 	/* this tag is not declared by any task */
 	STARPU_INVALID_STATE,
 	/* _starpu_tag_declare was called to associate the tag to a task */
@@ -40,16 +40,16 @@ typedef enum {
 //	STARPU_SCHEDULED,
 	/* the task has been performed */
 	STARPU_DONE
-} starpu_tag_state;
+};
 
 struct starpu_job_s;
 
-struct starpu_tag_s {
+struct _starpu_tag {
 	struct _starpu_spinlock lock;
 	starpu_tag_t id; /* an identifier for the task */
-	starpu_tag_state state;
+	enum _starpu_tag_state state;
 
-	struct starpu_cg_list_s tag_successors;
+	struct _starpu_cg_list tag_successors;
 
 	struct starpu_job_s *job; /* which job is associated to the tag if any ? */
 
@@ -60,10 +60,10 @@ struct starpu_tag_s {
 void starpu_tag_declare_deps(starpu_tag_t id, unsigned ndeps, ...);
 
 void _starpu_notify_dependencies(struct starpu_job_s *j);
-void _starpu_notify_tag_dependencies(struct starpu_tag_s *tag);
+void _starpu_notify_tag_dependencies(struct _starpu_tag *tag);
 
 void _starpu_tag_declare(starpu_tag_t id, struct starpu_job_s *job);
-void _starpu_tag_set_ready(struct starpu_tag_s *tag);
+void _starpu_tag_set_ready(struct _starpu_tag *tag);
 
 unsigned _starpu_submit_job_enforce_task_deps(struct starpu_job_s *j);
 

+ 4 - 4
src/core/dependencies/task_deps.c

@@ -26,9 +26,9 @@
 #include <core/dependencies/data_concurrency.h>
 #include <profiling/bound.h>
 
-static starpu_cg_t *create_cg_task(unsigned ntags, starpu_job_t j)
+static struct _starpu_cg *create_cg_task(unsigned ntags, starpu_job_t j)
 {
-	starpu_cg_t *cg = (starpu_cg_t *) malloc(sizeof(starpu_cg_t));
+	struct _starpu_cg *cg = (struct _starpu_cg *) malloc(sizeof(struct _starpu_cg));
 	STARPU_ASSERT(cg);
 
 	cg->ntags = ntags;
@@ -42,7 +42,7 @@ static starpu_cg_t *create_cg_task(unsigned ntags, starpu_job_t j)
 }
 
 /* the job lock must be taken */
-static void _starpu_task_add_succ(starpu_job_t j, starpu_cg_t *cg)
+static void _starpu_task_add_succ(starpu_job_t j, struct _starpu_cg *cg)
 {
 	STARPU_ASSERT(j);
 
@@ -71,7 +71,7 @@ void starpu_task_declare_deps_array(struct starpu_task *task, unsigned ndeps, st
 
 	_STARPU_PTHREAD_MUTEX_LOCK(&job->sync_mutex);
 
-	starpu_cg_t *cg = create_cg_task(ndeps, job);
+	struct _starpu_cg *cg = create_cg_task(ndeps, job);
 
 	unsigned i;
 	for (i = 0; i < ndeps; i++)

+ 6 - 6
src/core/errorcheck.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -18,9 +18,9 @@
 #include <core/errorcheck.h>
 #include <core/workers.h>
 
-void _starpu_set_local_worker_status(starpu_worker_status st)
+void _starpu_set_local_worker_status(enum _starpu_worker_status st)
 {
-	struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+	struct _starpu_worker *worker = _starpu_get_local_worker_key();
 
 	/* It is possible that we call this function from the application (and
 	 * thereforce outside a worker), for instance if we are executing the
@@ -29,9 +29,9 @@ void _starpu_set_local_worker_status(starpu_worker_status st)
 		worker->status = st;
 }
 
-starpu_worker_status _starpu_get_local_worker_status(void)
+enum _starpu_worker_status _starpu_get_local_worker_status(void)
 {
-	struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+	struct _starpu_worker *worker = _starpu_get_local_worker_key();
 	if (STARPU_UNLIKELY(!worker))
 		return STATUS_INVALID;
 
@@ -42,7 +42,7 @@ starpu_worker_status _starpu_get_local_worker_status(void)
  * execution of a task. */
 unsigned _starpu_worker_may_perform_blocking_calls(void)
 {
-	starpu_worker_status st = _starpu_get_local_worker_status();
+	enum _starpu_worker_status st = _starpu_get_local_worker_status();
 
 	return ( !(st == STATUS_CALLBACK) && !(st == STATUS_EXECUTING));
 }

+ 5 - 5
src/core/errorcheck.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -21,7 +21,7 @@
 #include <starpu.h>
 
 /* This type describes in which state a worker may be. */
-typedef enum {
+enum _starpu_worker_status {
 	/* invalid status (for instance if we request the status of some thread
 	 * that is not controlled by StarPU */
 	STATUS_INVALID,
@@ -35,15 +35,15 @@ typedef enum {
 	STATUS_CALLBACK,
 	/* while sleeping because there is nothing to do */
 	STATUS_SLEEPING
-} starpu_worker_status;
+};
 
 /* Specify what the local worker is currently doing (eg. executing a callback).
  * This permits to detect if this is legal to do a blocking call for instance.
  * */
-void _starpu_set_local_worker_status(starpu_worker_status st);
+void _starpu_set_local_worker_status(enum _starpu_worker_status st);
 
 /* Indicate what type of operation the worker is currently doing. */
-starpu_worker_status _starpu_get_local_worker_status(void);
+enum _starpu_worker_status _starpu_get_local_worker_status(void);
 
 /* It is forbidden to do blocking calls during some operations such as callback
  * or during the execution of a task. This function indicates whether it is

+ 5 - 5
src/core/jobs.c

@@ -247,9 +247,9 @@ static unsigned _starpu_not_all_tag_deps_are_fulfilled(starpu_job_t j)
 		return 0;
 	}
 
-	struct starpu_tag_s *tag = j->tag;
+	struct _starpu_tag *tag = j->tag;
 
-	struct starpu_cg_list_s *tag_successors = &tag->tag_successors;
+	struct _starpu_cg_list *tag_successors = &tag->tag_successors;
 
 	_starpu_spin_lock(&tag->lock);
 
@@ -278,7 +278,7 @@ static unsigned _starpu_not_all_task_deps_are_fulfilled(starpu_job_t j, unsigned
 {
 	unsigned ret;
 
-	struct starpu_cg_list_s *job_successors = &j->job_successors;
+	struct _starpu_cg_list *job_successors = &j->job_successors;
 
 	if (!job_is_already_locked)
 		_STARPU_PTHREAD_MUTEX_LOCK(&j->sync_mutex);	
@@ -363,7 +363,7 @@ unsigned _starpu_enforce_deps_starting_from_task(starpu_job_t j, unsigned job_is
 }
 
 /* This function must be called with worker->sched_mutex taken */
-struct starpu_task *_starpu_pop_local_task(struct starpu_worker_s *worker)
+struct starpu_task *_starpu_pop_local_task(struct _starpu_worker *worker)
 {
 	struct starpu_task *task = NULL;
 
@@ -373,7 +373,7 @@ struct starpu_task *_starpu_pop_local_task(struct starpu_worker_s *worker)
 	return task;
 }
 
-int _starpu_push_local_task(struct starpu_worker_s *worker, struct starpu_task *task, int back)
+int _starpu_push_local_task(struct _starpu_worker *worker, struct starpu_task *task, int back)
 {
 	/* Check that the worker is able to execute the task ! */
 	STARPU_ASSERT(task && task->cl);

+ 6 - 7
src/core/jobs.h

@@ -42,11 +42,10 @@
 #include <cuda.h>
 #endif
 
-struct starpu_worker_s;
+struct _starpu_worker;
 
 /* codelet function */
-typedef void (*cl_func)(void **, void *);
-typedef void (*callback)(void *);
+typedef void (*_starpu_cl_func)(void **, void *);
 
 #define STARPU_CPU_MAY_PERFORM(j)	((j)->task->cl->where & STARPU_CPU)
 #define STARPU_CUDA_MAY_PERFORM(j)      ((j)->task->cl->where & STARPU_CUDA)
@@ -75,11 +74,11 @@ LIST_TYPE(starpu_job,
 
 	/* If a tag is associated to the job, this points to the internal data
 	 * structure that describes the tag status. */
-	struct starpu_tag_s *tag;
+	struct _starpu_tag *tag;
 
 	/* Maintain a list of all the completion groups that depend on the job.
 	 * */
-	struct starpu_cg_list_s job_successors;
+	struct _starpu_cg_list job_successors;
 
 	/* The value of the footprint that identifies the job may be stored in
 	 * this structure. */
@@ -156,13 +155,13 @@ size_t _starpu_job_get_data_size(starpu_job_t j);
 
 /* Get a task from the local pool of tasks that were explicitly attributed to
  * that worker. */
-struct starpu_task *_starpu_pop_local_task(struct starpu_worker_s *worker);
+struct starpu_task *_starpu_pop_local_task(struct _starpu_worker *worker);
 
 /* Put a task into the pool of tasks that are explicitly attributed to the
  * specified worker. If "back" is set, the task is put at the back of the list.
  * Considering the tasks are popped from the back, this value should be 0 to
  * enforce a FIFO ordering. */
-int _starpu_push_local_task(struct starpu_worker_s *worker, struct starpu_task *task, int back);
+int _starpu_push_local_task(struct _starpu_worker *worker, struct starpu_task *task, int back);
 
 /* Returns the symbol associated to that job if any. */
 const char *_starpu_get_model_name(starpu_job_t j);

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

@@ -50,7 +50,7 @@ unsigned _starpu_get_calibrate_flag(void)
 
 enum starpu_perf_archtype starpu_worker_get_perf_archtype(int workerid)
 {
-	struct starpu_machine_config_s *config = _starpu_get_machine_config();
+	struct _starpu_machine_config *config = _starpu_get_machine_config();
 
 	/* This workerid may either be a basic worker or a combined worker */
 	unsigned nworkers = config->topology.nworkers;

+ 5 - 5
src/core/perfmodel/perfmodel_bus.c

@@ -87,7 +87,7 @@ static hwloc_topology_t hwtopology;
 #ifdef STARPU_USE_CUDA
 static void measure_bandwidth_between_host_and_dev_on_cpu_with_cuda(int dev, int cpu, struct dev_timing *dev_timing_per_cpu)
 {
-	struct starpu_machine_config_s *config = _starpu_get_machine_config();
+	struct _starpu_machine_config *config = _starpu_get_machine_config();
 	_starpu_bind_thread_on_cpu(config, cpu);
 	size_t size = SIZE;
 
@@ -237,7 +237,7 @@ static void measure_bandwidth_between_host_and_dev_on_cpu_with_opencl(int dev, i
         cl_int err=0;
 	size_t size = SIZE;
 
-        struct starpu_machine_config_s *config = _starpu_get_machine_config();
+        struct _starpu_machine_config *config = _starpu_get_machine_config();
 	_starpu_bind_thread_on_cpu(config, cpu);
 
 	/* Initialize OpenCL context on the device */
@@ -512,7 +512,7 @@ static void benchmark_all_gpu_devices(void)
 #warning Missing binding support, StarPU will not be able to properly benchmark NUMA topology
 #endif
 
-	struct starpu_machine_config_s *config = _starpu_get_machine_config();
+	struct _starpu_machine_config *config = _starpu_get_machine_config();
 	ncpus = _starpu_topology_get_nhwcpu(config);
 
 #ifdef STARPU_USE_CUDA
@@ -600,7 +600,7 @@ static void load_bus_affinity_file_content(void)
 	STARPU_ASSERT(f);
 
 #if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
-	struct starpu_machine_config_s *config = _starpu_get_machine_config();
+	struct _starpu_machine_config *config = _starpu_get_machine_config();
 	ncpus = _starpu_topology_get_nhwcpu(config);
         int gpu;
 
@@ -1103,7 +1103,7 @@ static void check_bus_config_file()
                 FILE *f;
                 int ret, read_cuda, read_opencl;
                 unsigned read_cpus;
-                struct starpu_machine_config_s *config = _starpu_get_machine_config();
+                struct _starpu_machine_config *config = _starpu_get_machine_config();
 
                 // Loading configuration from file
                 f = fopen(path, "r");

+ 8 - 8
src/core/sched_policy.c

@@ -138,7 +138,7 @@ static void display_sched_help_message(void)
 	 }
 }
 
-static struct starpu_sched_policy *select_sched_policy(struct starpu_machine_config_s *config)
+static struct starpu_sched_policy *select_sched_policy(struct _starpu_machine_config *config)
 {
 	struct starpu_sched_policy *selected_policy = NULL;
 	struct starpu_conf *user_conf = config->user_conf;
@@ -168,7 +168,7 @@ static struct starpu_sched_policy *select_sched_policy(struct starpu_machine_con
 	return &_starpu_sched_eager_policy;
 }
 
-void _starpu_init_sched_policy(struct starpu_machine_config_s *config)
+void _starpu_init_sched_policy(struct _starpu_machine_config *config)
 {
 	/* Perhaps we have to display some help */
 	display_sched_help_message();
@@ -199,7 +199,7 @@ void _starpu_init_sched_policy(struct starpu_machine_config_s *config)
 	policy.init_sched(&config->topology, &policy);
 }
 
-void _starpu_deinit_sched_policy(struct starpu_machine_config_s *config)
+void _starpu_deinit_sched_policy(struct _starpu_machine_config *config)
 {
 	if (policy.deinit_sched)
 		policy.deinit_sched(&config->topology, &policy);
@@ -216,8 +216,8 @@ static int _starpu_push_task_on_specific_worker(struct starpu_task *task, int wo
 	int is_basic_worker = (workerid < nbasic_workers);
 
 	unsigned memory_node; 
-	struct starpu_worker_s *worker = NULL;
-	struct starpu_combined_worker_s *combined_worker = NULL;
+	struct _starpu_worker *worker = NULL;
+	struct _starpu_combined_worker *combined_worker = NULL;
 
 	if (is_basic_worker)
 	{
@@ -303,7 +303,7 @@ int _starpu_push_task(starpu_job_t j, unsigned job_is_already_locked)
         return ret;
 }
 
-struct starpu_task *_starpu_pop_task(struct starpu_worker_s *worker)
+struct starpu_task *_starpu_pop_task(struct _starpu_worker *worker)
 {
 	struct starpu_task *task;
 
@@ -357,7 +357,7 @@ void _starpu_sched_post_exec_hook(struct starpu_task *task)
 
 void _starpu_wait_on_sched_event(void)
 {
-	struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+	struct _starpu_worker *worker = _starpu_get_local_worker_key();
 
 	_STARPU_PTHREAD_MUTEX_LOCK(worker->sched_mutex);
 
@@ -380,7 +380,7 @@ void _starpu_wait_on_sched_event(void)
  * a FIFO ordering. */
 int starpu_push_local_task(int workerid, struct starpu_task *task, int back)
 {
-	struct starpu_worker_s *worker = _starpu_get_worker_struct(workerid);
+	struct _starpu_worker *worker = _starpu_get_worker_struct(workerid);
 
 	return _starpu_push_local_task(worker, task, back);
 }

+ 4 - 4
src/core/sched_policy.h

@@ -22,15 +22,15 @@
 
 #include <starpu_scheduler.h>
 
-struct starpu_machine_config_s;
+struct _starpu_machine_config;
 struct starpu_sched_policy *_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 _starpu_init_sched_policy(struct _starpu_machine_config *config);
+void _starpu_deinit_sched_policy(struct _starpu_machine_config *config);
 
 int _starpu_push_task(starpu_job_t task, unsigned job_is_already_locked);
 /* pop a task that can be executed on the worker */
-struct starpu_task *_starpu_pop_task(struct starpu_worker_s *worker);
+struct starpu_task *_starpu_pop_task(struct _starpu_worker *worker);
 /* pop every task that can be executed on the worker */
 struct starpu_task *_starpu_pop_every_task(void);
 void _starpu_sched_post_exec_hook(struct starpu_task *task);

+ 19 - 19
src/core/topology.c

@@ -45,15 +45,15 @@
 		
 static unsigned topology_is_initialized = 0;
 
-static void _starpu_initialize_workers_bindid(struct starpu_machine_config_s *config);
+static void _starpu_initialize_workers_bindid(struct _starpu_machine_config *config);
 
 #if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
 #  ifdef STARPU_USE_CUDA
-static void _starpu_initialize_workers_cuda_gpuid(struct starpu_machine_config_s *config);
+static void _starpu_initialize_workers_cuda_gpuid(struct _starpu_machine_config *config);
 static struct starpu_htbl32_node *devices_using_cuda = NULL;
 #  endif
 #  ifdef STARPU_USE_OPENCL
-static void _starpu_initialize_workers_opencl_gpuid(struct starpu_machine_config_s *config);
+static void _starpu_initialize_workers_opencl_gpuid(struct _starpu_machine_config *config);
 #  endif
 static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int *explicit_workers_gpuid,
                                              int *current, int *workers_gpuid, const char *varname, unsigned nhwgpus);
@@ -65,7 +65,7 @@ static unsigned may_bind_automatically = 0;
  */
 
 #ifdef STARPU_USE_CUDA
-static void _starpu_initialize_workers_cuda_gpuid(struct starpu_machine_config_s *config)
+static void _starpu_initialize_workers_cuda_gpuid(struct _starpu_machine_config *config)
 {
 	struct starpu_machine_topology *topology = &config->topology;
 
@@ -77,7 +77,7 @@ static void _starpu_initialize_workers_cuda_gpuid(struct starpu_machine_config_s
 #endif
 
 #ifdef STARPU_USE_OPENCL
-static void _starpu_initialize_workers_opencl_gpuid(struct starpu_machine_config_s *config)
+static void _starpu_initialize_workers_opencl_gpuid(struct _starpu_machine_config *config)
 {
 	struct starpu_machine_topology *topology = &config->topology;
 
@@ -199,7 +199,7 @@ static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int
 #endif
 
 #ifdef STARPU_USE_CUDA
-static inline int _starpu_get_next_cuda_gpuid(struct starpu_machine_config_s *config)
+static inline int _starpu_get_next_cuda_gpuid(struct _starpu_machine_config *config)
 {
 	unsigned i = ((config->current_cuda_gpuid++) % config->topology.ncudagpus);
 
@@ -208,7 +208,7 @@ static inline int _starpu_get_next_cuda_gpuid(struct starpu_machine_config_s *co
 #endif
 
 #ifdef STARPU_USE_OPENCL
-static inline int _starpu_get_next_opencl_gpuid(struct starpu_machine_config_s *config)
+static inline int _starpu_get_next_opencl_gpuid(struct _starpu_machine_config *config)
 {
 	unsigned i = ((config->current_opencl_gpuid++) % config->topology.nopenclgpus);
 
@@ -216,7 +216,7 @@ static inline int _starpu_get_next_opencl_gpuid(struct starpu_machine_config_s *
 }
 #endif
 
-static void _starpu_init_topology(struct starpu_machine_config_s *config)
+static void _starpu_init_topology(struct _starpu_machine_config *config)
 {
 	struct starpu_machine_topology *topology = &config->topology;
 
@@ -259,14 +259,14 @@ static void _starpu_init_topology(struct starpu_machine_config_s *config)
 	}
 }
 
-unsigned _starpu_topology_get_nhwcpu(struct starpu_machine_config_s *config)
+unsigned _starpu_topology_get_nhwcpu(struct _starpu_machine_config *config)
 {
 	_starpu_init_topology(config);
 	
 	return config->topology.nhwcpus;
 }
 
-static int _starpu_init_machine_config(struct starpu_machine_config_s *config,
+static int _starpu_init_machine_config(struct _starpu_machine_config *config,
 				struct starpu_conf *user_conf)
 {
 	int explicitval STARPU_ATTRIBUTE_UNUSED;
@@ -481,7 +481,7 @@ static int _starpu_init_machine_config(struct starpu_machine_config_s *config,
 /*
  * Bind workers on the different processors
  */
-static void _starpu_initialize_workers_bindid(struct starpu_machine_config_s *config)
+static void _starpu_initialize_workers_bindid(struct _starpu_machine_config *config)
 {
 	char *strval;
 	unsigned i;
@@ -553,7 +553,7 @@ static void _starpu_initialize_workers_bindid(struct starpu_machine_config_s *co
  * worker. In case a list of preferred cpus was specified, we look for a an
  * available cpu among the list if possible, otherwise a round-robin policy is
  * used. */
-static inline int _starpu_get_next_bindid(struct starpu_machine_config_s *config,
+static inline int _starpu_get_next_bindid(struct _starpu_machine_config *config,
 				int *preferred_binding, int npreferred)
 {
 	struct starpu_machine_topology *topology = &config->topology;
@@ -594,7 +594,7 @@ static inline int _starpu_get_next_bindid(struct starpu_machine_config_s *config
 	return (int)topology->workers_bindid[i];
 }
 
-void _starpu_bind_thread_on_cpu(struct starpu_machine_config_s *config STARPU_ATTRIBUTE_UNUSED, unsigned cpuid)
+void _starpu_bind_thread_on_cpu(struct _starpu_machine_config *config STARPU_ATTRIBUTE_UNUSED, unsigned cpuid)
 {
 #ifdef STARPU_HAVE_HWLOC
 	int ret;
@@ -637,7 +637,7 @@ void _starpu_bind_thread_on_cpu(struct starpu_machine_config_s *config STARPU_AT
 #endif
 }
 
-static void _starpu_init_workers_binding(struct starpu_machine_config_s *config)
+static void _starpu_init_workers_binding(struct _starpu_machine_config *config)
 {
 	/* launch one thread per CPU */
 	unsigned ram_memory_node;
@@ -658,7 +658,7 @@ static void _starpu_init_workers_binding(struct starpu_machine_config_s *config)
 	{
 		unsigned memory_node = -1;
 		unsigned is_a_set_of_accelerators = 0;
-		struct starpu_worker_s *workerarg = &config->workers[worker];
+		struct _starpu_worker *workerarg = &config->workers[worker];
 
 		/* Perhaps the worker has some "favourite" bindings  */
 		int *preferred_binding = NULL;
@@ -697,7 +697,7 @@ static void _starpu_init_workers_binding(struct starpu_machine_config_s *config)
 				unsigned worker2;
 				for (worker2 = 0; worker2 < worker; worker2++)
 				{
-					struct starpu_worker_s *workerarg = &config->workers[worker];
+					struct _starpu_worker *workerarg = &config->workers[worker];
 					if (workerarg->arch == STARPU_CUDA_WORKER) {
 						unsigned memory_node2 = starpu_worker_get_memory_node(worker2);
 						_starpu_register_bus(memory_node2, memory_node);
@@ -765,7 +765,7 @@ static void _starpu_init_workers_binding(struct starpu_machine_config_s *config)
 }
 
 
-int _starpu_build_topology(struct starpu_machine_config_s *config)
+int _starpu_build_topology(struct _starpu_machine_config *config)
 {
 	int ret;
 
@@ -783,7 +783,7 @@ int _starpu_build_topology(struct starpu_machine_config_s *config)
 	return 0;
 }
 
-void _starpu_destroy_topology(struct starpu_machine_config_s *config __attribute__ ((unused)))
+void _starpu_destroy_topology(struct _starpu_machine_config *config __attribute__ ((unused)))
 {
 	/* cleanup StarPU internal data structures */
 	_starpu_deinit_memory_nodes();
@@ -792,7 +792,7 @@ void _starpu_destroy_topology(struct starpu_machine_config_s *config __attribute
 	for (worker = 0; worker < config->topology.nworkers; worker++)
 	{
 #ifdef STARPU_HAVE_HWLOC
-		struct starpu_worker_s *workerarg = &config->workers[worker];
+		struct _starpu_worker *workerarg = &config->workers[worker];
 		hwloc_bitmap_free(workerarg->initial_hwloc_cpu_set);
 		hwloc_bitmap_free(workerarg->current_hwloc_cpu_set);
 #endif

+ 5 - 5
src/core/topology.h

@@ -24,20 +24,20 @@
 #include <common/fxt.h>
 
 /* TODO actually move this struct into this header */
-struct starpu_machine_config_s;
+struct _starpu_machine_config;
 
 /* Detect the number of memory nodes and where to bind the different workers. */
-int _starpu_build_topology(struct starpu_machine_config_s *config);
+int _starpu_build_topology(struct _starpu_machine_config *config);
 
 /* Destroy all resources used to store the topology of the machine. */
-void _starpu_destroy_topology(struct starpu_machine_config_s *config);
+void _starpu_destroy_topology(struct _starpu_machine_config *config);
 
 /* returns the number of physical cpus */
-unsigned _starpu_topology_get_nhwcpu(struct starpu_machine_config_s *config);
+unsigned _starpu_topology_get_nhwcpu(struct _starpu_machine_config *config);
 
 /* Bind the current thread on the CPU logically identified by "cpuid". The
  * logical ordering of the processors is either that of hwloc (if available),
  * or the ordering exposed by the OS. */
-void _starpu_bind_thread_on_cpu(struct starpu_machine_config_s *config, unsigned cpuid);
+void _starpu_bind_thread_on_cpu(struct _starpu_machine_config *config, unsigned cpuid);
 
 #endif // __TOPOLOGY_H__

+ 22 - 22
src/core/workers.c

@@ -39,9 +39,9 @@ static enum { UNINITIALIZED, CHANGING, INITIALIZED } initialized = UNINITIALIZED
 
 static pthread_key_t worker_key;
 
-static struct starpu_machine_config_s config;
+static struct _starpu_machine_config config;
 
-struct starpu_machine_config_s *_starpu_get_machine_config(void)
+struct _starpu_machine_config *_starpu_get_machine_config(void)
 {
 	return &config;
 }
@@ -144,10 +144,10 @@ int starpu_combined_worker_may_execute_task(unsigned workerid, struct starpu_tas
 
 #ifdef STARPU_USE_GORDON
 static unsigned gordon_inited = 0;	
-static struct starpu_worker_set_s gordon_worker_set;
+static struct _starpu_worker_set gordon_worker_set;
 #endif
 
-static void _starpu_init_worker_queue(struct starpu_worker_s *workerarg)
+static void _starpu_init_worker_queue(struct _starpu_worker *workerarg)
 {
 	pthread_cond_t *cond = workerarg->sched_cond;
 	pthread_mutex_t *mutex = workerarg->sched_mutex;
@@ -157,7 +157,7 @@ static void _starpu_init_worker_queue(struct starpu_worker_s *workerarg)
 	_starpu_memory_node_register_condition(cond, mutex, memory_node);
 }
 
-static void _starpu_launch_drivers(struct starpu_machine_config_s *config)
+static void _starpu_launch_drivers(struct _starpu_machine_config *config)
 {
 	config->running = 1;
 
@@ -169,7 +169,7 @@ static void _starpu_launch_drivers(struct starpu_machine_config_s *config)
 	unsigned worker;
 	for (worker = 0; worker < nworkers; worker++)
 	{
-		struct starpu_worker_s *workerarg = &config->workers[worker];
+		struct _starpu_worker *workerarg = &config->workers[worker];
 
 		workerarg->config = config;
 
@@ -258,7 +258,7 @@ static void _starpu_launch_drivers(struct starpu_machine_config_s *config)
 
 	for (worker = 0; worker < nworkers; worker++)
 	{
-		struct starpu_worker_s *workerarg = &config->workers[worker];
+		struct _starpu_worker *workerarg = &config->workers[worker];
 
 		switch (workerarg->arch) {
 			case STARPU_CPU_WORKER:
@@ -282,14 +282,14 @@ static void _starpu_launch_drivers(struct starpu_machine_config_s *config)
 
 }
 
-void _starpu_set_local_worker_key(struct starpu_worker_s *worker)
+void _starpu_set_local_worker_key(struct _starpu_worker *worker)
 {
 	pthread_setspecific(worker_key, worker);
 }
 
-struct starpu_worker_s *_starpu_get_local_worker_key(void)
+struct _starpu_worker *_starpu_get_local_worker_key(void)
 {
-	return (struct starpu_worker_s *) pthread_getspecific(worker_key);
+	return (struct _starpu_worker *) pthread_getspecific(worker_key);
 }
 
 /* Initialize the starpu_conf with default values */
@@ -427,7 +427,7 @@ int starpu_init(struct starpu_conf *user_conf)
  * Handle runtime termination 
  */
 
-static void _starpu_terminate_workers(struct starpu_machine_config_s *config)
+static void _starpu_terminate_workers(struct _starpu_machine_config *config)
 {
 	int status STARPU_ATTRIBUTE_UNUSED;
 	unsigned workerid;
@@ -438,8 +438,8 @@ static void _starpu_terminate_workers(struct starpu_machine_config_s *config)
 		
 		_STARPU_DEBUG("wait for worker %u\n", workerid);
 
-		struct starpu_worker_set_s *set = config->workers[workerid].set;
-		struct starpu_worker_s *worker = &config->workers[workerid];
+		struct _starpu_worker_set *set = config->workers[workerid].set;
+		struct _starpu_worker *worker = &config->workers[workerid];
 
 		/* in case StarPU termination code is called from a callback,
  		 * we have to check if pthread_self() is the worker itself */
@@ -500,7 +500,7 @@ unsigned _starpu_worker_can_block(unsigned memnode STARPU_ATTRIBUTE_UNUSED)
 #endif
 }
 
-static void _starpu_kill_all_workers(struct starpu_machine_config_s *config)
+static void _starpu_kill_all_workers(struct _starpu_machine_config *config)
 {
 	/* set the flag which will tell workers to stop */
 	config->running = 0;
@@ -627,7 +627,7 @@ unsigned starpu_spu_worker_get_count(void)
  * that is not controlled by StarPU, starpu_worker_get_id returns -1. */
 int starpu_worker_get_id(void)
 {
-	struct starpu_worker_s * worker;
+	struct _starpu_worker * worker;
 
 	worker = _starpu_get_local_worker_key();
 	if (worker)
@@ -643,7 +643,7 @@ int starpu_worker_get_id(void)
 
 int starpu_combined_worker_get_id(void)
 {
-	struct starpu_worker_s *worker;
+	struct _starpu_worker *worker;
 
 	worker = _starpu_get_local_worker_key();
 	if (worker)
@@ -659,7 +659,7 @@ int starpu_combined_worker_get_id(void)
 
 int starpu_combined_worker_get_size(void)
 {
-	struct starpu_worker_s *worker;
+	struct _starpu_worker *worker;
 
 	worker = _starpu_get_local_worker_key();
 	if (worker)
@@ -675,7 +675,7 @@ int starpu_combined_worker_get_size(void)
 
 int starpu_combined_worker_get_rank(void)
 {
-	struct starpu_worker_s *worker;
+	struct _starpu_worker *worker;
 
 	worker = _starpu_get_local_worker_key();
 	if (worker)
@@ -694,12 +694,12 @@ int starpu_worker_get_devid(int id)
 	return config.workers[id].devid;
 }
 
-struct starpu_worker_s *_starpu_get_worker_struct(unsigned id)
+struct _starpu_worker *_starpu_get_worker_struct(unsigned id)
 {
 	return &config.workers[id];
 }
 
-struct starpu_combined_worker_s *_starpu_get_combined_worker_struct(unsigned id)
+struct _starpu_combined_worker *_starpu_get_combined_worker_struct(unsigned id)
 {
 	unsigned basic_worker_count = starpu_worker_get_count();
 
@@ -742,14 +742,14 @@ void starpu_worker_get_name(int id, char *dst, size_t maxlen)
 }
 
 /* Retrieve the status which indicates what the worker is currently doing. */
-starpu_worker_status _starpu_worker_get_status(int workerid)
+enum _starpu_worker_status _starpu_worker_get_status(int workerid)
 {
 	return config.workers[workerid].status;
 }
 
 /* Change the status of the worker which indicates what the worker is currently
  * doing (eg. executing a callback). */
-void _starpu_worker_set_status(int workerid, starpu_worker_status status)
+void _starpu_worker_set_status(int workerid, enum _starpu_worker_status status)
 {
 	config.workers[workerid].status = status;
 }

+ 20 - 20
src/core/workers.h

@@ -53,8 +53,8 @@
 
 #include <starpu_parameters.h>
 
-struct starpu_worker_s {
-	struct starpu_machine_config_s *config;
+struct _starpu_worker {
+	struct _starpu_machine_config *config;
         pthread_mutex_t mutex;
 	enum starpu_archtype arch; /* what is the type of worker ? */
 	uint32_t worker_mask; /* what is the type of worker ? */
@@ -71,11 +71,11 @@ struct starpu_worker_s {
 	pthread_cond_t *sched_cond; /* condition variable used when the worker waits for tasks. */
 	pthread_mutex_t *sched_mutex; /* mutex protecting sched_cond */
 	struct starpu_task_list local_tasks; /* this queue contains tasks that have been explicitely submitted to that queue */
-	struct starpu_worker_set_s *set; /* in case this worker belongs to a set */
+	struct _starpu_worker_set *set; /* in case this worker belongs to a set */
 	struct starpu_job_list_s *terminated_jobs; /* list of pending jobs which were executed */
 	unsigned worker_is_running;
 	unsigned worker_is_initialized;
-	starpu_worker_status status; /* what is the worker doing now ? (eg. CALLBACK) */
+	enum _starpu_worker_status status; /* what is the worker doing now ? (eg. CALLBACK) */
 	char name[48];
 	char short_name[10];
 
@@ -89,7 +89,7 @@ struct starpu_worker_s {
 #endif
 };
 
-struct starpu_combined_worker_s {
+struct _starpu_combined_worker {
 	enum starpu_perf_archtype perf_arch; /* in case there are different models of the same arch */
 	uint32_t worker_mask; /* what is the type of workers ? */
 	int worker_size;
@@ -106,18 +106,18 @@ struct starpu_combined_worker_s {
 
 /* in case a single CPU worker may control multiple 
  * accelerators (eg. Gordon for n SPUs) */
-struct starpu_worker_set_s {
+struct _starpu_worker_set {
         pthread_mutex_t mutex;
 	pthread_t worker_thread; /* the thread which runs the worker */
 	unsigned nworkers;
 	unsigned joined; /* only one thread may call pthread_join*/
 	void *retval;
-	struct starpu_worker_s *workers;
+	struct _starpu_worker *workers;
         pthread_cond_t ready_cond; /* indicate when the set is ready */
 	unsigned set_is_initialized;
 };
 
-struct starpu_machine_config_s {
+struct _starpu_machine_config {
 
 	struct starpu_machine_topology topology;
 
@@ -136,11 +136,11 @@ struct starpu_machine_config_s {
 	
 	/* Basic workers : each of this worker is running its own driver and
 	 * can be combined with other basic workers. */
-	struct starpu_worker_s workers[STARPU_NMAXWORKERS];
+	struct _starpu_worker workers[STARPU_NMAXWORKERS];
 
 	/* Combined workers: these worker are a combination of basic workers
 	 * that can run parallel tasks together. */
-	struct starpu_combined_worker_s combined_workers[STARPU_NMAX_COMBINEDWORKERS];
+	struct _starpu_combined_worker combined_workers[STARPU_NMAX_COMBINEDWORKERS];
 
 	/* This bitmask indicates which kinds of worker are available. For
 	 * instance it is possible to test if there is a CUDA worker with
@@ -179,31 +179,31 @@ unsigned _starpu_worker_can_block(unsigned memnode);
  * */
 void _starpu_block_worker(int workerid, pthread_cond_t *cond, pthread_mutex_t *mutex);
 
-/* The starpu_worker_s structure describes all the state of a StarPU worker.
+/* The _starpu_worker structure describes all the state of a StarPU worker.
  * This function sets the pthread key which stores a pointer to this structure.
  * */
-void _starpu_set_local_worker_key(struct starpu_worker_s *worker);
+void _starpu_set_local_worker_key(struct _starpu_worker *worker);
 
-/* Returns the starpu_worker_s structure that describes the state of the
+/* Returns the _starpu_worker structure that describes the state of the
  * current worker. */
-struct starpu_worker_s *_starpu_get_local_worker_key(void);
+struct _starpu_worker *_starpu_get_local_worker_key(void);
 
-/* Returns the starpu_worker_s structure that describes the state of the
+/* Returns the _starpu_worker structure that describes the state of the
  * specified worker. */
-struct starpu_worker_s *_starpu_get_worker_struct(unsigned id);
+struct _starpu_worker *_starpu_get_worker_struct(unsigned id);
 
-struct starpu_combined_worker_s *_starpu_get_combined_worker_struct(unsigned id);
+struct _starpu_combined_worker *_starpu_get_combined_worker_struct(unsigned id);
 
 /* Returns the structure that describes the overall machine configuration (eg.
  * all workers and topology). */
-struct starpu_machine_config_s *_starpu_get_machine_config(void);
+struct _starpu_machine_config *_starpu_get_machine_config(void);
 
 /* Retrieve the status which indicates what the worker is currently doing. */
-starpu_worker_status _starpu_worker_get_status(int workerid);
+enum _starpu_worker_status _starpu_worker_get_status(int workerid);
 
 /* Change the status of the worker which indicates what the worker is currently
  * doing (eg. executing a callback). */
-void _starpu_worker_set_status(int workerid, starpu_worker_status status);
+void _starpu_worker_set_status(int workerid, enum _starpu_worker_status status);
 
 /* TODO move */
 unsigned _starpu_execute_registered_progression_hooks(void);

+ 1 - 1
src/datawizard/memory_nodes.c

@@ -171,7 +171,7 @@ void _starpu_memory_node_register_condition(pthread_cond_t *cond, pthread_mutex_
 
 unsigned starpu_worker_get_memory_node(unsigned workerid)
 {
-	struct starpu_machine_config_s *config = _starpu_get_machine_config();
+	struct _starpu_machine_config *config = _starpu_get_machine_config();
 
 	/* This workerid may either be a basic worker or a combined worker */
 	unsigned nworkers = config->topology.nworkers;

+ 1 - 1
src/datawizard/reduction.c

@@ -49,7 +49,7 @@ void _starpu_redux_init_data_replicate(starpu_data_handle_t handle, struct starp
 	struct starpu_codelet *init_cl = handle->init_cl;
 	STARPU_ASSERT(init_cl);
 
-	cl_func init_func = NULL;
+	_starpu_cl_func init_func = NULL;
 	
 	/* TODO Check that worker may execute the codelet */
 

+ 6 - 6
src/debug/structures_size.c

@@ -29,10 +29,10 @@ void _starpu_debug_display_structures_size(void)
 			(unsigned) sizeof(struct starpu_job_s), (unsigned) sizeof(struct starpu_job_s));
 	fprintf(stderr, "struct _starpu_data_state\t%u bytes\t(%x)\n",
 			(unsigned) sizeof(struct _starpu_data_state), (unsigned) sizeof(struct _starpu_data_state));
-	fprintf(stderr, "struct starpu_tag_s\t\t%u bytes\t(%x)\n",
-			(unsigned) sizeof(struct starpu_tag_s), (unsigned) sizeof(struct starpu_tag_s));
-	fprintf(stderr, "struct starpu_cg_s\t\t%u bytes\t(%x)\n",
-			(unsigned) sizeof(struct starpu_cg_s), (unsigned) sizeof(struct starpu_cg_s));
-	fprintf(stderr, "struct starpu_worker_s\t\t%u bytes\t(%x)\n",
-			(unsigned) sizeof(struct starpu_worker_s), (unsigned) sizeof(struct starpu_worker_s));
+	fprintf(stderr, "struct _starpu_tag\t\t%u bytes\t(%x)\n",
+			(unsigned) sizeof(struct _starpu_tag), (unsigned) sizeof(struct _starpu_tag));
+	fprintf(stderr, "struct _starpu_cg\t\t%u bytes\t(%x)\n",
+			(unsigned) sizeof(struct _starpu_cg), (unsigned) sizeof(struct _starpu_cg));
+	fprintf(stderr, "struct _starpu_worker\t\t%u bytes\t(%x)\n",
+			(unsigned) sizeof(struct _starpu_worker), (unsigned) sizeof(struct _starpu_worker));
 }

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

@@ -25,7 +25,7 @@
 #include "driver_cpu.h"
 #include <core/sched_policy.h>
 
-static int execute_job_on_cpu(starpu_job_t j, struct starpu_worker_s *cpu_args, int is_parallel_task, int rank, enum starpu_perf_archtype perf_arch)
+static int execute_job_on_cpu(starpu_job_t j, struct _starpu_worker *cpu_args, int is_parallel_task, int rank, enum starpu_perf_archtype perf_arch)
 {
 	int ret;
 	struct timespec codelet_start, codelet_end;
@@ -57,13 +57,13 @@ static int execute_job_on_cpu(starpu_job_t j, struct starpu_worker_s *cpu_args,
 	if ((rank == 0) || (cl->type != STARPU_FORKJOIN))
 	{
 		if (cl->cpu_func != STARPU_MULTIPLE_CPU_IMPLEMENTATIONS) {
-			cl_func func = cl->cpu_func;
+			_starpu_cl_func func = cl->cpu_func;
 			STARPU_ASSERT(func);
 			func(task->interfaces, task->cl_arg);
 		}
 		else {
 			/* _STARPU_DEBUG("CPU driver : running kernel (%d)\n", j->nimpl); */
-			cl_func func = cl->cpu_funcs[j->nimpl];
+			_starpu_cl_func func = cl->cpu_funcs[j->nimpl];
 			STARPU_ASSERT(func);
 			func(task->interfaces, task->cl_arg);
 		}
@@ -86,7 +86,7 @@ static int execute_job_on_cpu(starpu_job_t j, struct starpu_worker_s *cpu_args,
 
 void *_starpu_cpu_worker(void *arg)
 {
-	struct starpu_worker_s *cpu_arg = (struct starpu_worker_s *) arg;
+	struct _starpu_worker *cpu_arg = (struct _starpu_worker *) arg;
 	unsigned memnode = cpu_arg->memory_node;
 	int workerid = cpu_arg->workerid;
 	int devid = cpu_arg->devid;
@@ -171,7 +171,7 @@ void *_starpu_cpu_worker(void *arg)
 			rank = j->active_task_alias_count++;
 			_STARPU_PTHREAD_MUTEX_UNLOCK(&j->sync_mutex);
 
-			struct starpu_combined_worker_s *combined_worker;
+			struct _starpu_combined_worker *combined_worker;
 			combined_worker = _starpu_get_combined_worker_struct(j->combined_workerid);
 
 			cpu_arg->combined_workerid = j->combined_workerid;

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

@@ -173,7 +173,7 @@ void _starpu_init_cuda(void)
 	assert(ncudagpus <= STARPU_MAXCUDADEVS);
 }
 
-static int execute_job_on_cuda(starpu_job_t j, struct starpu_worker_s *args)
+static int execute_job_on_cuda(starpu_job_t j, struct _starpu_worker *args)
 {
 	int ret;
 	uint32_t mask = 0;
@@ -219,13 +219,13 @@ static int execute_job_on_cuda(starpu_job_t j, struct starpu_worker_s *args)
 #endif
 
 	if (cl->cuda_func != STARPU_MULTIPLE_CUDA_IMPLEMENTATIONS) {
-		cl_func func = cl->cuda_func;
+		_starpu_cl_func func = cl->cuda_func;
 		STARPU_ASSERT(func);
 		func(task->interfaces, task->cl_arg);
 	}
 	else {
 		/* _STARPU_DEBUG("Cuda driver : running kernel * (%d)\n", j->nimpl); */
-		cl_func func = cl->cuda_funcs[j->nimpl];
+		_starpu_cl_func func = cl->cuda_funcs[j->nimpl];
 		STARPU_ASSERT(func);
 		func(task->interfaces, task->cl_arg);
 	}
@@ -241,7 +241,7 @@ static int execute_job_on_cuda(starpu_job_t j, struct starpu_worker_s *args)
 
 void *_starpu_cuda_worker(void *arg)
 {
-	struct starpu_worker_s* args = arg;
+	struct _starpu_worker* args = arg;
 
 	int devid = args->devid;
 	int workerid = args->workerid;

+ 3 - 3
src/drivers/driver_common/driver_common.c

@@ -25,7 +25,7 @@
 #include <drivers/driver_common/driver_common.h>
 #include <starpu_top.h>
 
-void _starpu_driver_start_job(struct starpu_worker_s *args, starpu_job_t j, struct timespec *codelet_start, int rank)
+void _starpu_driver_start_job(struct _starpu_worker *args, starpu_job_t j, struct timespec *codelet_start, int rank)
 {
 	struct starpu_task *task = j->task;
 	struct starpu_codelet *cl = task->cl;
@@ -59,7 +59,7 @@ void _starpu_driver_start_job(struct starpu_worker_s *args, starpu_job_t j, stru
 	STARPU_TRACE_START_CODELET_BODY(j);
 }
 
-void _starpu_driver_end_job(struct starpu_worker_s *args, starpu_job_t j, struct timespec *codelet_end, int rank)
+void _starpu_driver_end_job(struct _starpu_worker *args, starpu_job_t j, struct timespec *codelet_end, int rank)
 {
 	struct starpu_task *task = j->task;
 	struct starpu_codelet *cl = task->cl;
@@ -85,7 +85,7 @@ void _starpu_driver_end_job(struct starpu_worker_s *args, starpu_job_t j, struct
 
 	args->status = STATUS_UNKNOWN;
 }
-void _starpu_driver_update_job_feedback(starpu_job_t j, struct starpu_worker_s *worker_args,
+void _starpu_driver_update_job_feedback(starpu_job_t j, struct _starpu_worker *worker_args,
 					enum starpu_perf_archtype perf_arch,
 					struct timespec *codelet_start, struct timespec *codelet_end, double conversion_time)
 {

+ 3 - 3
src/drivers/driver_common/driver_common.h

@@ -23,11 +23,11 @@
 #include <core/jobs.h>
 #include <common/utils.h>
 
-void _starpu_driver_start_job(struct starpu_worker_s *args, starpu_job_t j,
+void _starpu_driver_start_job(struct _starpu_worker *args, starpu_job_t j,
 		struct timespec *codelet_start, int rank);
-void _starpu_driver_end_job(struct starpu_worker_s *args, starpu_job_t j,
+void _starpu_driver_end_job(struct _starpu_worker *args, starpu_job_t j,
 		struct timespec *codelet_end, int rank);
-void _starpu_driver_update_job_feedback(starpu_job_t j, struct starpu_worker_s *worker_args,
+void _starpu_driver_update_job_feedback(starpu_job_t j, struct _starpu_worker *worker_args,
 		enum starpu_perf_archtype perf_arch,
 		struct timespec *codelet_start, struct timespec *codelet_end, double);
 

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

@@ -36,7 +36,7 @@ pthread_mutex_t progress_mutex;
 
 struct gordon_task_wrapper_s {
 	/* who has executed that ? */
-	struct starpu_worker_s *worker;
+	struct _starpu_worker *worker;
 
 	struct starpu_job_list_s *list;	/* StarPU */
 	struct gordon_ppu_job_s *gordon_job; /* gordon*/
@@ -52,7 +52,7 @@ void *gordon_worker_progress(void *arg)
 	_STARPU_DEBUG("gordon_worker_progress\n");
 
 	/* fix the thread on the correct cpu */
-	struct starpu_worker_set_s *gordon_set_arg = arg;
+	struct _starpu_worker_set *gordon_set_arg = arg;
 	unsigned prog_thread_bind_id = 
 		(gordon_set_arg->workers[0].bindid + 1)%(gordon_set_arg->config->nhwcores);
 	_starpu_bind_thread_on_cpu(gordon_set_arg->config, prog_thread_bind_id);
@@ -188,7 +188,7 @@ static void gordon_callback_list_func(void *arg)
 
 	/* we don't know who will execute that codelet : so we actually defer the
  	 * execution of the StarPU codelet and the job termination later */
-	struct starpu_worker_s *worker = task_wrapper->worker;
+	struct _starpu_worker *worker = task_wrapper->worker;
 	STARPU_ASSERT(worker);
 
 	wrapper_list = task_wrapper->list;
@@ -236,7 +236,7 @@ static void gordon_callback_func(void *arg)
 
 	/* we don't know who will execute that codelet : so we actually defer the
  	 * execution of the StarPU codelet and the job termination later */
-	struct starpu_worker_s *worker = task_wrapper->worker;
+	struct _starpu_worker *worker = task_wrapper->worker;
 	STARPU_ASSERT(worker);
 
 	task_wrapper->terminated = 1;
@@ -249,7 +249,7 @@ static void gordon_callback_func(void *arg)
 	free(task_wrapper);
 }
 
-int inject_task(starpu_job_t j, struct starpu_worker_s *worker)
+int inject_task(starpu_job_t j, struct _starpu_worker *worker)
 {
 	struct starpu_task *task = j->task;
 	int ret = _starpu_fetch_task_input(task, 0);
@@ -269,7 +269,7 @@ int inject_task(starpu_job_t j, struct starpu_worker_s *worker)
 	return 0;
 }
 
-int inject_task_list(struct starpu_job_list_s *list, struct starpu_worker_s *worker)
+int inject_task_list(struct starpu_job_list_s *list, struct _starpu_worker *worker)
 {
 	/* first put back all tasks that can not be performed by Gordon */
 	unsigned nvalids = 0;
@@ -330,7 +330,7 @@ int inject_task_list(struct starpu_job_list_s *list, struct starpu_worker_s *wor
 	return 0;
 }
 
-void *gordon_worker_inject(struct starpu_worker_set_s *arg)
+void *gordon_worker_inject(struct _starpu_worker_set *arg)
 {
 
 	while(_starpu_machine_is_running()) {
@@ -418,7 +418,7 @@ void *gordon_worker_inject(struct starpu_worker_set_s *arg)
 
 void *_starpu_gordon_worker(void *arg)
 {
-	struct starpu_worker_set_s *gordon_set_arg = arg;
+	struct _starpu_worker_set *gordon_set_arg = arg;
 
 	_starpu_bind_thread_on_cpu(gordon_set_arg->config, gordon_set_arg->workers[0].bindid);
 
@@ -434,7 +434,7 @@ void *_starpu_gordon_worker(void *arg)
 	unsigned spu;
 	for (spu = 0; spu < gordon_set_arg->nworkers; spu++)
 	{
-		struct starpu_worker_s *worker = &gordon_set_arg->workers[spu];
+		struct _starpu_worker *worker = &gordon_set_arg->workers[spu];
 		snprintf(worker->name, sizeof(worker->name), "SPU %d", worker->id);
 		snprintf(worker->short_name, sizeof(worker->short_name), "SPU %d", worker->id);
 	}

+ 14 - 14
src/drivers/opencl/driver_opencl.c

@@ -108,14 +108,14 @@ void starpu_opencl_get_queue(int devid, cl_command_queue *queue)
 
 void starpu_opencl_get_current_queue(cl_command_queue *queue)
 {
-	struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+	struct _starpu_worker *worker = _starpu_get_local_worker_key();
 	STARPU_ASSERT(queue);
         *queue = queues[worker->devid];
 }
 
 void starpu_opencl_get_current_context(cl_context *context)
 {
-	struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+	struct _starpu_worker *worker = _starpu_get_local_worker_key();
 	STARPU_ASSERT(context);
         *context = contexts[worker->devid];
 }
@@ -181,7 +181,7 @@ cl_int _starpu_opencl_allocate_memory(void **addr, size_t size, cl_mem_flags fla
 {
 	cl_int err;
         cl_mem address;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
 
 	address = clCreateBuffer(contexts[worker->devid], flags, size, NULL, &err);
 	if (err == CL_OUT_OF_HOST_MEMORY) return err;
@@ -194,7 +194,7 @@ cl_int _starpu_opencl_allocate_memory(void **addr, size_t size, cl_mem_flags fla
 cl_int _starpu_opencl_copy_ram_to_opencl_async_sync(void *ptr, unsigned src_node STARPU_ATTRIBUTE_UNUSED, cl_mem buffer, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t size, size_t offset, cl_event *event, int *ret)
 {
         cl_int err;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
         cl_bool blocking;
 
         blocking = (event == NULL) ? CL_TRUE : CL_FALSE;
@@ -227,7 +227,7 @@ cl_int _starpu_opencl_copy_ram_to_opencl_async_sync(void *ptr, unsigned src_node
 cl_int _starpu_opencl_copy_ram_to_opencl(void *ptr, unsigned src_node STARPU_ATTRIBUTE_UNUSED, cl_mem buffer, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t size, size_t offset, cl_event *event)
 {
         cl_int err;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
         cl_bool blocking;
 
         blocking = (event == NULL) ? CL_TRUE : CL_FALSE;
@@ -244,7 +244,7 @@ cl_int _starpu_opencl_copy_ram_to_opencl(void *ptr, unsigned src_node STARPU_ATT
 cl_int _starpu_opencl_copy_opencl_to_ram_async_sync(cl_mem buffer, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *ptr, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t size, size_t offset, cl_event *event, int *ret)
 {
         cl_int err;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
         cl_bool blocking;
 
         blocking = (event == NULL) ? CL_TRUE : CL_FALSE;
@@ -275,7 +275,7 @@ cl_int _starpu_opencl_copy_opencl_to_ram_async_sync(cl_mem buffer, unsigned src_
 cl_int _starpu_opencl_copy_opencl_to_ram(cl_mem buffer, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *ptr, unsigned dst_node STARPU_ATTRIBUTE_UNUSED, size_t size, size_t offset, cl_event *event)
 {
         cl_int err;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
         cl_bool blocking;
 
         blocking = (event == NULL) ? CL_TRUE : CL_FALSE;
@@ -295,7 +295,7 @@ cl_int _starpu_opencl_copy_rect_opencl_to_ram(cl_mem buffer, unsigned src_node S
                                               size_t host_row_pitch, size_t host_slice_pitch, cl_event *event)
 {
         cl_int err;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
         cl_bool blocking;
 
         blocking = (event == NULL) ? CL_TRUE : CL_FALSE;
@@ -315,7 +315,7 @@ cl_int _starpu_opencl_copy_rect_ram_to_opencl(void *ptr, unsigned src_node STARP
                                               size_t host_row_pitch, size_t host_slice_pitch, cl_event *event)
 {
         cl_int err;
-        struct starpu_worker_s *worker = _starpu_get_local_worker_key();
+        struct _starpu_worker *worker = _starpu_get_local_worker_key();
         cl_bool blocking;
 
         blocking = (event == NULL) ? CL_TRUE : CL_FALSE;
@@ -409,11 +409,11 @@ void _starpu_opencl_init(void)
 }
 
 static unsigned _starpu_opencl_get_device_name(int dev, char *name, int lname);
-static int _starpu_opencl_execute_job(starpu_job_t j, struct starpu_worker_s *args);
+static int _starpu_opencl_execute_job(starpu_job_t j, struct _starpu_worker *args);
 
 void *_starpu_opencl_worker(void *arg)
 {
-	struct starpu_worker_s* args = arg;
+	struct _starpu_worker* args = arg;
 
 	int devid = args->devid;
 	int workerid = args->workerid;
@@ -547,7 +547,7 @@ unsigned _starpu_opencl_get_device_count(void)
 	return nb_devices;
 }
 
-static int _starpu_opencl_execute_job(starpu_job_t j, struct starpu_worker_s *args)
+static int _starpu_opencl_execute_job(starpu_job_t j, struct _starpu_worker *args)
 {
 	int ret;
 	uint32_t mask = 0;
@@ -573,13 +573,13 @@ static int _starpu_opencl_execute_job(starpu_job_t j, struct starpu_worker_s *ar
 	_starpu_driver_start_job(args, j, &codelet_start, 0);
 
 	if (cl->opencl_func != STARPU_MULTIPLE_OPENCL_IMPLEMENTATIONS) {
-		cl_func func = cl->opencl_func;
+		_starpu_cl_func func = cl->opencl_func;
 		STARPU_ASSERT(func);
 		func(task->interfaces, task->cl_arg);
 	}
 	else {
 		/* _STARPU_DEBUG("OpenCL driver : running kernel (%d)\n", j->nimpl); */
-		cl_func func = cl->opencl_funcs[j->nimpl];
+		_starpu_cl_func func = cl->opencl_funcs[j->nimpl];
 		STARPU_ASSERT(func);
 		func(task->interfaces, task->cl_arg);
 	}

+ 1 - 1
src/profiling/profiling.c

@@ -151,7 +151,7 @@ static void _starpu_worker_reset_profiling_info_with_lock(int workerid)
 	
 	/* We detect if the worker is already sleeping or doing some
 	 * computation */
-	starpu_worker_status status = _starpu_worker_get_status(workerid);
+	enum _starpu_worker_status status = _starpu_worker_get_status(workerid);
 
 	if (status == STATUS_SLEEPING)
 	{

+ 5 - 5
src/sched_policies/detect_combined_workers.c

@@ -206,12 +206,12 @@ static unsigned find_and_assign_combinations_with_hwloc_recursive(tree_t *tree,
     hwloc_obj_t obj = tree->obj;
     int *workers = tree->workers;
 
-    struct starpu_machine_config_s *config = _starpu_get_machine_config();
+    struct _starpu_machine_config *config = _starpu_get_machine_config();
 
     /* Is this a leaf ? (eg. a PU for hwloc) */
     if (!hwloc_compare_types(config->cpu_depth, obj->depth))
     {
-	struct starpu_worker_s *worker = obj->userdata;
+	struct _starpu_worker *worker = obj->userdata;
 
 	/* If this is a CPU worker add it at the beginning
 	 * of the array , write 1 in the field nb_workers and
@@ -414,7 +414,7 @@ static void find_and_assign_combinations_with_hwloc(struct starpu_machine_topolo
 
 static void find_and_assign_combinations_without_hwloc(struct starpu_machine_topology *topology)
 {
-    struct starpu_machine_config_s *config = _starpu_get_machine_config();
+    struct _starpu_machine_config *config = _starpu_get_machine_config();
 
     /* We put the id of all CPU workers in this array */
     int cpu_workers[STARPU_NMAXWORKERS];
@@ -453,7 +453,7 @@ static void find_and_assign_combinations_without_hwloc(struct starpu_machine_top
 
 static void combine_all_cpu_workers(struct starpu_machine_topology *topology)
 {
-    struct starpu_machine_config_s *config = _starpu_get_machine_config();
+    struct _starpu_machine_config *config = _starpu_get_machine_config();
 
     int cpu_workers[STARPU_NMAXWORKERS];
     unsigned ncpus = 0;
@@ -475,7 +475,7 @@ static void combine_all_cpu_workers(struct starpu_machine_topology *topology)
 
 void _starpu_sched_find_worker_combinations(struct starpu_machine_topology *topology)
 {
-    struct starpu_machine_config_s *config = _starpu_get_machine_config();
+    struct _starpu_machine_config *config = _starpu_get_machine_config();
 
     if ((config->user_conf && config->user_conf->single_combined_worker > 0) || starpu_get_env_number("STARPU_SINGLE_COMBINED_WORKER") > 0)
 	combine_all_cpu_workers(topology);

+ 1 - 1
src/sched_policies/parallel_greedy.c

@@ -195,7 +195,7 @@ static struct starpu_task *pop_task_pgreedy_policy(void)
 		else {
 			/* The master needs to dispatch the task between the
 			 * different combined workers */
-			struct starpu_combined_worker_s *combined_worker;
+			struct _starpu_combined_worker *combined_worker;
 			combined_worker = _starpu_get_combined_worker_struct(best_workerid);
 			int worker_size = combined_worker->worker_size;
 			int *combined_workerid = combined_worker->combined_workerid;

+ 1 - 1
src/sched_policies/parallel_heft.c

@@ -100,7 +100,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 	}
 	else {
 		/* This is a combined worker so we create task aliases */
-		struct starpu_combined_worker_s *combined_worker;
+		struct _starpu_combined_worker *combined_worker;
 		combined_worker = _starpu_get_combined_worker_struct(best_workerid);
 		int worker_size = combined_worker->worker_size;
 		int *combined_workerid = combined_worker->combined_workerid;