Mercurial > hg > Game > Cerium
diff 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 |
line wrap: on
line diff
--- a/TaskManager/Gpu/GpuThreads.cc Fri Apr 06 18:30:09 2012 +0900 +++ b/TaskManager/Gpu/GpuThreads.cc Sat Apr 07 09:29:09 2012 +0900 @@ -53,3 +53,26 @@ return NULL } + +int +GpuThreads::get_mail(memaddr *ret) +{ + *ret = args.scheduler->mail_read_from_host(); + return 1; +} + +int +GpuThreads::has_mail(memaddr *ret) +{ + if (args.scheduler->has_mail_from_host() != 0) { + return get_mail(ret); + } else { + return 0; + } +} + +void +CpuThreads::send_mail(int cpuid, int num, memaddr *data) +{ + args.scheduler->mail_write_from_host(*data); +}