|
@@ -1,6 +1,6 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
- * Copyright (C) 2009, 2010 Université de Bordeaux 1
|
|
|
+ * Copyright (C) 2009, 2010, 2014 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
|
|
@@ -26,7 +26,14 @@ void _starpu_set_local_worker_status(enum _starpu_worker_status st)
|
|
|
* thereforce outside a worker), for instance if we are executing the
|
|
|
* callback function of a task with a "NULL" codelet. */
|
|
|
if (worker)
|
|
|
+ {
|
|
|
+ starpu_pthread_mutex_t *sched_mutex;
|
|
|
+ starpu_pthread_cond_t *sched_cond;
|
|
|
+ starpu_worker_get_sched_condition(worker->workerid, &sched_mutex, &sched_cond);
|
|
|
+ STARPU_PTHREAD_MUTEX_LOCK(mutex);
|
|
|
worker->status = st;
|
|
|
+ STARPU_PTHREAD_MUTEX_UNLOCK(mutex);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
enum _starpu_worker_status _starpu_get_local_worker_status(void)
|