Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some mistakes
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 29 Feb 2016 23:02:47 +0000 (00:02 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 29 Feb 2016 23:02:47 +0000 (00:02 +0100)
teshsuite/java/semaphore/SemaphoreGC.java
teshsuite/java/sleep_host_off/SleepHostOff.java
teshsuite/xbt/heap_bench/heap_bench.c

index d740251..1dd871c 100644 (file)
@@ -10,6 +10,7 @@
 package semaphore;
 
 import org.simgrid.msg.*;
+import org.simgrid.msg.Process;
 
 class SemCreator extends Process {
   Semaphore sem; 
index 0b15188..02368af 100644 (file)
@@ -7,6 +7,7 @@
 package sleep_host_off;
 
 import org.simgrid.msg.*;
+import org.simgrid.msg.Process;
 
 class Sleeper extends Process {
   public Sleeper(Host host, String name, String[] args) {
index ce3d7fc..cff04fe 100644 (file)
@@ -26,6 +26,16 @@ static int compare_double(const void *a, const void *b)
   return -1;
 }
 
+static void test_reset_heap(xbt_heap_t * heap, int size)
+{
+  xbt_heap_free(*heap);
+  *heap = xbt_heap_new(size, NULL);
+
+  for (int i = 0; i < size; i++) {
+    xbt_heap_push(*heap, NULL, (10.0 * rand() / (RAND_MAX + 1.0)));
+  }
+}
+
 static void test_heap_validity(int size)
 {
   xbt_heap_t heap = xbt_heap_new(size, NULL);
@@ -79,16 +89,6 @@ static void test_heap_mean_operation(int size)
   xbt_heap_free(heap);
 }
 
-static void test_reset_heap(xbt_heap_t * heap, int size)
-{
-  xbt_heap_free(*heap);
-  *heap = xbt_heap_new(size, NULL);
-
-  for (int i = 0; i < size; i++) {
-    xbt_heap_push(*heap, NULL, (10.0 * rand() / (RAND_MAX + 1.0)));
-  }
-}
-
 int main(int argc, char **argv)
 {
   int size;