192
|
1 #include <stdio.h>
|
|
2 #include <stdlib.h>
|
|
3 #include <string.h>
|
|
4 #include "TaskManager.h"
|
|
5 #include "Func.h"
|
|
6
|
|
7 extern void task_init(void);
|
|
8
|
260
|
9 const char *usr_help_str = "Usage: ./renew_task";
|
192
|
10
|
|
11 static int
|
|
12 init(int argc, char **argv)
|
|
13 {
|
|
14 return 0;
|
|
15 }
|
|
16
|
|
17 static void
|
|
18 renew_init(void)
|
|
19 {
|
|
20 HTask *renew;
|
|
21
|
|
22 printf("[PPE] Create Task : RenewStart\n\n");
|
|
23
|
|
24 renew = manager->create_task(RENEW_START);
|
|
25 renew->set_cpu(SPE_ANY);
|
|
26
|
|
27 // add Active Queue
|
|
28 renew->spawn();
|
|
29 }
|
|
30
|
|
31 int
|
260
|
32 TMmain(int argc, char *argv[])
|
192
|
33 {
|
|
34 if (init(argc, argv) < 0) {
|
|
35 return -1;
|
|
36 }
|
|
37
|
|
38 // Task Register
|
|
39 // ppe/task_init.cc
|
|
40 task_init();
|
|
41
|
|
42 printf("[PPE] Program Start\n\n");
|
|
43
|
|
44 renew_init();
|
|
45
|
|
46 return 0;
|
|
47 }
|