Mercurial > hg > Members > e085722 > Cerium
comparison example/renew_task/spe/Renew1.cc @ 0:04e28d8d3c6f
first commit
author | Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Nov 2010 01:23:25 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:04e28d8d3c6f |
---|---|
1 #include <stdio.h> | |
2 #include "Renew1.h" | |
3 #include "SpeProfile.h" | |
4 #include "Func.h" | |
5 | |
6 /* これは必須 */ | |
7 SchedDefineTask(Renew1); | |
8 | |
9 static int | |
10 run(SchedTask *s, void *rbuf, void *wbuf) | |
11 { | |
12 SpeProfile *profile = (SpeProfile*)s->global_get(0); | |
13 profile->ProfStop(); | |
14 profile->ProfPrint(); | |
15 | |
16 int *test_num = (int *)s->get_input(rbuf,0); | |
17 int *local_num = (int *)s->get_param(0); | |
18 | |
19 s->printf("[SPE] Renew1 test_num = %d\n", *test_num); | |
20 s->printf("[SPE] Renew1 local_num = %d\n", *local_num); | |
21 | |
22 s->printf("[SPE] ** running Renew1\n"); | |
23 | |
24 s->printf("[SPE] Create Task : Renew2\n"); | |
25 HTaskPtr nextTask = s->create_task(RENEW2); | |
26 nextTask->spawn(); | |
27 | |
28 s->printf("[SPE] ** finish Renew1\n\n"); | |
29 | |
30 return 0; | |
31 } |