Mercurial > hg > Game > Cerium
comparison TaskManager/Gpu/GpuThreads.cc @ 1437:fa6723e7d329 draft
fix GpuTaskManagerImpl
author | Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Apr 2012 09:29:09 +0900 |
parents | 42057124fb44 |
children | 3c787a21ff10 |
comparison
equal
deleted
inserted
replaced
1436:42057124fb44 | 1437:fa6723e7d329 |
---|---|
51 g_scheduler->run(); | 51 g_scheduler->run(); |
52 g_scheduler->finish(); | 52 g_scheduler->finish(); |
53 | 53 |
54 return NULL | 54 return NULL |
55 } | 55 } |
56 | |
57 int | |
58 GpuThreads::get_mail(memaddr *ret) | |
59 { | |
60 *ret = args.scheduler->mail_read_from_host(); | |
61 return 1; | |
62 } | |
63 | |
64 int | |
65 GpuThreads::has_mail(memaddr *ret) | |
66 { | |
67 if (args.scheduler->has_mail_from_host() != 0) { | |
68 return get_mail(ret); | |
69 } else { | |
70 return 0; | |
71 } | |
72 } | |
73 | |
74 void | |
75 CpuThreads::send_mail(int cpuid, int num, memaddr *data) | |
76 { | |
77 args.scheduler->mail_write_from_host(*data); | |
78 } |