Selaa lähdekoodia

Really fix build

Samuel Thibault 6 vuotta sitten
vanhempi
commit
b1ee744473
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      tests/model-checking/starpu_barrier.c

+ 9 - 1
tests/model-checking/starpu_barrier.c

@@ -19,7 +19,6 @@
 #define _STARPU_MALLOC(p, s) do {p = malloc(s);} while (0)
 #define _STARPU_CALLOC(p, n, s) do {p = calloc(n, s);} while (0)
 #define _STARPU_REALLOC(p, s) do {p = realloc(p, s);} while (0)
-#define starpu_sleep(d) MSG_process_sleep(d)
 
 #define STARPU_DEBUG_PREFIX "[starpu]"
 #ifdef STARPU_VERBOSE
@@ -71,6 +70,15 @@ static void _starpu_clock_gettime(struct timespec *ts)
 	ts->tv_nsec = floor((now - ts->tv_sec) * 1000000000);
 }
 
+void starpu_sleep(float nb_sec)
+{
+#ifdef HAVE_SG_ACTOR_SLEEP_FOR
+	sg_actor_sleep_for(nb_sec);
+#else
+	MSG_process_sleep(nb_sec);
+#endif
+}
+
 #include <common/barrier.c>
 #include <common/thread.c>