diff example/many_task/sort.cc @ 573:31d37456bbd4 draft

example fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 23 Oct 2009 00:48:25 +0900
parents fbcbcc5ad3b5
children 94d82f2c842f
line wrap: on
line diff
--- a/example/many_task/sort.cc	Fri Oct 23 00:40:24 2009 +0900
+++ b/example/many_task/sort.cc	Fri Oct 23 00:48:25 2009 +0900
@@ -1,4 +1,5 @@
 #include "TaskManager.h"
+#include "SchedTask.h"
 #include "sort.h"
 #include "Func.h"
 
@@ -13,7 +14,7 @@
 static int last_half_block_num;
 static TaskManager *manager;
 
-static void sort_restart(void *);
+static void sort_restart(SchedTask *, void *, void *);
 static void sort_start();
 
 /**
@@ -44,7 +45,7 @@
  * @param d 生成された btask の数
  */
 static void
-sort_restart(void *d)
+sort_restart(SchedTask *s, void *d, void *e)
 {
     static int cnt = 0;
     int max = (int)d;
@@ -111,7 +112,7 @@
 	for (int i = 0; i < half_num; i++) {
 	    bsort[i]->wait_for(fsort[i]);
 	    bsort[i]->wait_for(fsort[i+1]);
-	    bsort[i]->set_post(sort_restart, (void*)(half_num));
+	    bsort[i]->set_post(sort_restart, (void*)(half_num),0);
 	    bsort[i]->spawn();
 	}
     }