Mercurial > hg > Members > kono > Cerium
diff TaskManager/Cell/SpeThreads.cc @ 629:8843edf37c0e
Cell 64 bit tried, but not yet worked.
Cell's list DMA is 32bit.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Nov 2009 13:32:58 +0900 |
parents | 5b178db5988a |
children | 7c9ded1ea750 |
line wrap: on
line diff
--- a/TaskManager/Cell/SpeThreads.cc Tue Nov 17 01:35:12 2009 +0900 +++ b/TaskManager/Cell/SpeThreads.cc Wed Nov 18 13:32:58 2009 +0900 @@ -6,7 +6,7 @@ SpeThreads::~SpeThreads(void) { - unsigned int mail = MY_SPE_COMMAND_EXIT; + memaddr mail = (memaddr)MY_SPE_COMMAND_EXIT; int ret; for (int i = 0; i < spe_num; i++) { @@ -112,20 +112,21 @@ * if ([ret] < 0) no data read */ int -SpeThreads::get_mail(int speid, int count, unsigned int* ret) +SpeThreads::get_mail(int speid, int count, memaddr *ret) { - return spe_out_mbox_read(spe_ctx[speid], ret, count); + // only used in CellTaskManagerImpl (should be removed?) + return spe_out_mbox_read(spe_ctx[speid], (unsigned int*)ret, count*(sizeof(memaddr)/sizeof(int))); } int -SpeThreads::check_mail(int speid, int count, unsigned int* ret) +SpeThreads::check_mail(int speid, int count, memaddr *ret) { /* * spe_out_mbox_status return only 1, waiting for multiple length * does not work. */ if (spe_out_mbox_status(spe_ctx[speid]) >= 1) { - return spe_out_mbox_read(spe_ctx[speid], ret, count); + return spe_out_mbox_read(spe_ctx[speid], (unsigned int*)ret, count*(sizeof(memaddr)/sizeof(int))); } else { return 0; } @@ -146,14 +147,14 @@ * @param [num] The number of messages */ void -SpeThreads::send_mail(int speid, int num, unsigned int *data) +SpeThreads::send_mail(int speid, int num, memaddr *data) { - spe_in_mbox_write(spe_ctx[speid], data, num, SPE_MBOX_ALL_BLOCKING); + spe_in_mbox_write(spe_ctx[speid], (unsigned int *)data, num*(sizeof(memaddr)/sizeof(int)), SPE_MBOX_ALL_BLOCKING); } void -SpeThreads::add_output_tasklist(int command, unsigned int buff, int alloc_size) +SpeThreads::add_output_tasklist(int command, memaddr buff, int alloc_size) { /* * output TaskList が無ければ新しく作る