Mercurial > hg > Members > tkaito > task_dandy
comparison ppe/PadAllocate.cc @ 26:6bea374ee604
global alloc test.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 Dec 2010 02:20:37 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
23:3fb8a6a34e24 | 26:6bea374ee604 |
---|---|
1 #include <stdio.h> | |
2 #include <string.h> | |
3 #include "PadAllocate.h" | |
4 #include "Func.h" | |
5 | |
6 /* これは必須 */ | |
7 SchedDefineTask(PadAllocate); | |
8 | |
9 static int | |
10 run(SchedTask *s, void *rbuf, void *wbuf) | |
11 { | |
12 | |
13 void *idata = s->get_input(rbuf, 0); | |
14 int pad_id = (int)s->get_param(0); | |
15 int size = (int)s->get_param(1); | |
16 | |
17 void *buff = s->global_alloc(pad_id, size); | |
18 if (idata != NULL) { | |
19 memcpy(buff,idata,size); | |
20 } | |
21 | |
22 return 0; | |
23 } |