diff example/share_task/ppe/Exec.cc @ 467:44c0bce54dcf

fix all examples. test_render is not working now.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 01 Oct 2009 19:25:25 +0900
parents 58fd16298954
children 60aa3f241b10
line wrap: on
line diff
--- a/example/share_task/ppe/Exec.cc	Thu Oct 01 17:33:58 2009 +0900
+++ b/example/share_task/ppe/Exec.cc	Thu Oct 01 19:25:25 2009 +0900
@@ -5,20 +5,20 @@
 /* これは必須 */
 SchedDefineTask(Exec);
 
-int
-Exec::run(void *rbuf, void *wbuf)
+static int
+run(SchedTask *s, void *rbuf, void *wbuf)
 {
-    int *idata = (int*)global_get(DATA_ID);
-    int length = get_param(0);
-    int number = get_param(1);
-    int calnum = get_param(2);
+    int *idata = (int*)s->global_get(DATA_ID);
+    int length = s->get_param(0);
+    int number = s->get_param(1);
+    int calnum = s->get_param(2);
 
-    printf("[TASK_EXEC %02d] ", number);
+    s->printf("[TASK_EXEC %02d] ", number);
     for (int i = 0; i < length; i++) {
 	idata[i] += calnum;
-	printf("%03d ", idata[i]);
+	s->printf("%03d ", idata[i]);
     }
-    printf("\n");
+    s->printf("\n");
 
     return 0;
 }