浏览代码

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
 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
 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
 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. */
 /* 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);
 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, 
 /* returns workers not belonging to any context, be careful no mutex is used, 
    the list might not be updated */
    the list might not be updated */
 int starpu_worker_get_nids_ctx_free_by_type(enum starpu_archtype type, int *workerids, int maxsize);
 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__
 #endif // __WORKERS_H__