Browse Source

cpu_set_t is actually simply glibc-specific

Samuel Thibault 14 years ago
parent
commit
ed491558e5
3 changed files with 12 additions and 12 deletions
  1. 4 4
      src/core/combined_workers.c
  2. 3 3
      src/core/topology.c
  3. 5 5
      src/core/workers.h

+ 4 - 4
src/core/combined_workers.c

@@ -113,9 +113,9 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 
 	/* Note that we maintain both the cpu_set and the hwloc_cpu_set so that
 	 * the application is not forced to use hwloc when it is available. */
-#if !defined(STARPU_HAVE_WINDOWS) && !defined(__APPLE__)
+#ifdef __GLIBC__
 	CPU_ZERO(&combined_worker->cpu_set);
-#endif /* !STARPU_HAVE_WINDOWS && !Ã__APPLE__ */
+#endif /* __GLIBC__ */
 
 #ifdef STARPU_HAVE_HWLOC
 	combined_worker->hwloc_cpu_set = hwloc_bitmap_alloc();
@@ -124,7 +124,7 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 	for (i = 0; i < nworkers; i++)
 	{
 		int id = workerid_array[i];
-#if !defined(STARPU_HAVE_WINDOWS) && !defined(__APPLE__)
+#ifdef __GLIBC__
 #ifdef CPU_OR
 		CPU_OR(&combined_worker->cpu_set,
 			&combined_worker->cpu_set,
@@ -136,7 +136,7 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 				CPU_SET(j, &combined_worker->cpu_set);
 		}
 #endif
-#endif /* !STARPU_HAVE_WINDOWS && !__APPLE__*/
+#endif /* __GLIBC__ */
 
 #ifdef STARPU_HAVE_HWLOC
 		hwloc_bitmap_or(combined_worker->hwloc_cpu_set,

+ 3 - 3
src/core/topology.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010  Université de Bordeaux 1
+ * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -722,13 +722,13 @@ static void _starpu_init_workers_binding(struct starpu_machine_config_s *config)
 
 		workerarg->memory_node = memory_node;
 
-#if !defined(STARPU_HAVE_WINDOWS) && !defined(__APPLE__)
+#ifdef __GLIBC__
 		/* Save the initial cpuset */
 		CPU_ZERO(&workerarg->initial_cpu_set);
 		CPU_SET(workerarg->bindid, &workerarg->initial_cpu_set);
 		CPU_ZERO(&workerarg->current_cpu_set);
 		CPU_SET(workerarg->bindid, &workerarg->current_cpu_set);
-#endif /* !STARPU_HAVE_WINDOWS && !__APPLE__ */
+#endif /* __GLIBC__ */
 
 #ifdef STARPU_HAVE_HWLOC
 		/* Clear the cpu set and set the cpu */

+ 5 - 5
src/core/workers.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010  Université de Bordeaux 1
+ * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
  * Copyright (C) 2010  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -78,10 +78,10 @@ struct starpu_worker_s {
 	starpu_worker_status status; /* what is the worker doing now ? (eg. CALLBACK) */
 	char name[32];
 
-#if !defined(STARPU_HAVE_WINDOWS) && !defined(__APPLE__)
+#ifdef __GLIBC__
 	cpu_set_t initial_cpu_set;
 	cpu_set_t current_cpu_set;
-#endif /* !STARPU_HAVE_WINDOWS && ! __APPLE__ */
+#endif /* __GLIBC__ */
 #ifdef STARPU_HAVE_HWLOC
 	hwloc_cpuset_t initial_hwloc_cpu_set;
 	hwloc_cpuset_t current_hwloc_cpu_set;
@@ -95,9 +95,9 @@ struct starpu_combined_worker_s {
 	unsigned memory_node; /* which memory node is associated that worker to ? */
 	int combined_workerid[STARPU_NMAXWORKERS];
 
-#if !defined(STARPU_HAVE_WINDOWS) && !defined(__APPLE__)
+#ifdef __GLIBC__
 	cpu_set_t cpu_set;
-#endif /* !STARPU_HAVE_WINDOWS && !__APPLE__*/
+#endif /* __GLIBC__ */
 #ifdef STARPU_HAVE_HWLOC
 	hwloc_cpuset_t hwloc_cpu_set;
 #endif