Prechádzať zdrojové kódy

gcc-plugin: as lookup_name cannot lookup for a struct, add a typedef for struct starpu_codelet

Nathalie Furmento 13 rokov pred
rodič
commit
dd254fcf2f
2 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  1. 1 1
      gcc-plugin/src/starpu.c
  2. 4 0
      include/starpu_task.h

+ 1 - 1
gcc-plugin/src/starpu.c

@@ -77,7 +77,7 @@ static const char task_implementation_wrapper_attribute_name[] =
   ".task_implementation_wrapper";
 
 /* Names of data structures defined in <starpu.h>.  */
-static const char codelet_struct_name[] = "struct starpu_codelet";
+static const char codelet_struct_name[] = "starpu_codelet_gcc";
 static const char task_struct_name[] = "starpu_task";
 
 /* Cached function declarations.  */

+ 4 - 0
include/starpu_task.h

@@ -109,6 +109,10 @@ struct starpu_codelet {
 	unsigned long per_worker_stats[STARPU_NMAXWORKERS];
 };
 
+#ifdef STARPU_GCC_PLUGIN
+typedef struct starpu_codelet starpu_codelet_gcc;
+#endif /* STARPU_GCC_PLUGIN */
+
 struct starpu_task {
 	struct starpu_codelet *cl;