Преглед изворни кода

fix definition of starpu_worker_get_sched_condition when simgrid is enabled (thanks to Lionel Eyraud-Dubois and Paul Renaud-Goud for reporting the bug)

Nathalie Furmento пре 12 година
родитељ
комит
39f05e55be
2 измењених фајлова са 9 додато и 2 уклоњено
  1. 4 2
      include/starpu_scheduler.h
  2. 5 0
      src/core/workers.h

+ 4 - 2
include/starpu_scheduler.h

@@ -125,8 +125,10 @@ condition variable. This function specifies which condition variable (and the
 associated mutex) should be used to block (and to wake up) a worker. Note that
 multiple workers may use the same condition variable. For instance, in the case
 of a scheduling strategy with a single task queue, the same condition variable
-would be used to block and wake up all workers.   */	
-	void starpu_worker_get_sched_condition(int workerid, pthread_mutex_t **sched_mutex, pthread_cond_t **sched_cond);
+would be used to block and wake up all workers.   */
+#if !defined(_MSC_VER) && !defined(STARPU_SIMGRID)
+void starpu_worker_get_sched_condition(int workerid, pthread_mutex_t **sched_mutex, pthread_cond_t **sched_cond);
+#endif
 
 /* Check if the worker specified by workerid can execute the codelet. */
 int starpu_worker_can_execute_task(unsigned workerid, struct starpu_task *task, unsigned nimpl);

+ 5 - 0
src/core/workers.h

@@ -254,4 +254,9 @@ int starpu_worker_get_nids_by_type(enum starpu_archtype type, int *workerids, in
 /* returns workers not belonging to any context, be careful no mutex is used, 
    the list might not be updated */
 int starpu_worker_get_nids_ctx_free_by_type(enum starpu_archtype type, int *workerids, int maxsize);
+
+#if defined(_MSC_VER) || defined(STARPU_SIMGRID)
+void starpu_worker_get_sched_condition(int workerid, _starpu_pthread_mutex_t **sched_mutex, _starpu_pthread_cond_t **sched_cond);
+#endif
+
 #endif // __WORKERS_H__