|
@@ -17,6 +17,7 @@
|
|
|
|
|
|
#include <starpu.h>
|
|
#include <starpu.h>
|
|
#include <core/simgrid.h>
|
|
#include <core/simgrid.h>
|
|
|
|
+#include <core/workers.h>
|
|
|
|
|
|
#ifdef STARPU_SIMGRID
|
|
#ifdef STARPU_SIMGRID
|
|
#include <xbt/synchro_core.h>
|
|
#include <xbt/synchro_core.h>
|
|
@@ -337,7 +338,7 @@ int starpu_pthread_mutex_lock(starpu_pthread_mutex_t *mutex)
|
|
int p_ret = pthread_mutex_lock(mutex);
|
|
int p_ret = pthread_mutex_lock(mutex);
|
|
int workerid = starpu_worker_get_id();
|
|
int workerid = starpu_worker_get_id();
|
|
if(workerid != -1 && starpu_worker_mutex_is_sched_mutex(workerid, mutex))
|
|
if(workerid != -1 && starpu_worker_mutex_is_sched_mutex(workerid, mutex))
|
|
- starpu_worker_set_flag_sched_mutex_locked(workerid, 1);
|
|
|
|
|
|
+ _starpu_worker_set_flag_sched_mutex_locked(workerid, 1);
|
|
|
|
|
|
_STARPU_TRACE_MUTEX_LOCKED();
|
|
_STARPU_TRACE_MUTEX_LOCKED();
|
|
|
|
|
|
@@ -351,7 +352,7 @@ int starpu_pthread_mutex_unlock(starpu_pthread_mutex_t *mutex)
|
|
int p_ret = pthread_mutex_unlock(mutex);
|
|
int p_ret = pthread_mutex_unlock(mutex);
|
|
int workerid = starpu_worker_get_id();
|
|
int workerid = starpu_worker_get_id();
|
|
if(workerid != -1 && starpu_worker_mutex_is_sched_mutex(workerid, mutex))
|
|
if(workerid != -1 && starpu_worker_mutex_is_sched_mutex(workerid, mutex))
|
|
- starpu_worker_set_flag_sched_mutex_locked(workerid, 0);
|
|
|
|
|
|
+ _starpu_worker_set_flag_sched_mutex_locked(workerid, 0);
|
|
|
|
|
|
_STARPU_TRACE_MUTEX_UNLOCKED();
|
|
_STARPU_TRACE_MUTEX_UNLOCKED();
|
|
|
|
|
|
@@ -369,7 +370,7 @@ int starpu_pthread_mutex_trylock(starpu_pthread_mutex_t *mutex)
|
|
{
|
|
{
|
|
int workerid = starpu_worker_get_id();
|
|
int workerid = starpu_worker_get_id();
|
|
if(workerid != -1 && starpu_worker_mutex_is_sched_mutex(workerid, mutex))
|
|
if(workerid != -1 && starpu_worker_mutex_is_sched_mutex(workerid, mutex))
|
|
- starpu_worker_set_flag_sched_mutex_locked(workerid, 1);
|
|
|
|
|
|
+ _starpu_worker_set_flag_sched_mutex_locked(workerid, 1);
|
|
|
|
|
|
_STARPU_TRACE_MUTEX_LOCKED();
|
|
_STARPU_TRACE_MUTEX_LOCKED();
|
|
}
|
|
}
|