1099
|
1 #include <stdio.h>
|
|
2 #include "SchedTask.h"
|
1100
|
3 #include "../Container.h"
|
1099
|
4 #include "Resize.h"
|
|
5 #include "Func.h"
|
|
6
|
|
7 /* これは必須 */
|
|
8 SchedDefineTask1(Resize,resize);
|
|
9
|
|
10 static int
|
|
11 resize(SchedTask *smanager, void *rbuf, void *wbuf)
|
|
12 {
|
1102
|
13 long length = (long)smanager->get_param(0);
|
1099
|
14
|
1102
|
15 smanager->set_outputSize(0, sizeof(Container)+sizeof(int)*(length-1));
|
1099
|
16 smanager->setup_outputData();
|
1102
|
17
|
|
18 ContainerPtr wcontainer = (ContainerPtr)smanager->get_output(wbuf, 0);
|
1099
|
19
|
1102
|
20 for (int i =0; i < length;i++){
|
|
21 wcontainer->data[i] = i;
|
|
22 }
|
|
23
|
|
24 wcontainer->length = length;
|
1099
|
25 return 0;
|
|
26 }
|