Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/ppe/CpuThreads.cc @ 1478:beda5f2f88ce draft
remove singleton
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 20 Jul 2012 05:47:14 +0900 |
parents | 5ca4e9469c65 |
children | f2512fb94223 |
comparison
equal
deleted
inserted
replaced
1477:5ca4e9469c65 | 1478:beda5f2f88ce |
---|---|
11 SchedExternTask(StartProfile); | 11 SchedExternTask(StartProfile); |
12 | 12 |
13 | 13 |
14 CpuThreads::CpuThreads(int num, int useRefDma, int start_id) : cpu_num(num), use_refdma(useRefDma), id_offset(start_id) { | 14 CpuThreads::CpuThreads(int num, int useRefDma, int start_id) : cpu_num(num), use_refdma(useRefDma), id_offset(start_id) { |
15 #ifdef __CERIUM_GPU__ | 15 #ifdef __CERIUM_GPU__ |
16 gpu = new GpuThreds; | 16 gpu = new GpuThreads(); |
17 #endif | 17 #endif |
18 threads = new pthread_t[cpu_num]; | 18 threads = new pthread_t[cpu_num]; |
19 args = new cpu_thread_arg_t[cpu_num]; | 19 args = new cpu_thread_arg_t[cpu_num]; |
20 wait = new Sem(0); | 20 wait = new Sem(0); |
21 | 21 |
38 } | 38 } |
39 | 39 |
40 delete [] threads; | 40 delete [] threads; |
41 delete [] args; | 41 delete [] args; |
42 #ifdef __CERIUM_GPU__ | 42 #ifdef __CERIUM_GPU__ |
43 delete gpu; | 43 delete [] gpu; |
44 #endif | 44 #endif |
45 } | 45 } |
46 | 46 |
47 void * | 47 void * |
48 CpuThreads::cpu_thread_run(void *args) | 48 CpuThreads::cpu_thread_run(void *args) |