comparison TaskManager/Cell/spe/CellDmaManager.cc @ 1010:44b2c4cb539d

fix
author yutaka@localhost.localdomain
date Thu, 28 Oct 2010 17:40:13 +0900
parents c67379f9d411
children 80b18af207c2
comparison
equal deleted inserted replaced
1009:c67379f9d411 1010:44b2c4cb539d
3 #include "CellDmaManager.h" 3 #include "CellDmaManager.h"
4 #include "Scheduler.h" 4 #include "Scheduler.h"
5 5
6 6
7 unsigned long long alloc_flag = 0; 7 unsigned long long alloc_flag = 0;
8 8 // singleton
9 QueueInfo<MailQueue> *MailPool = new QueueInfo<MailQueue>() ; 9 QueueInfo<MailQueue> *MailPool = new QueueInfo<MailQueue>() ;
10 10
11 /** 11 /**
12 * DMA Load 12 * DMA Load
13 * 13 *
93 if (0 != spu_readchcnt(SPU_WrOutMbox)) { 93 if (0 != spu_readchcnt(SPU_WrOutMbox)) {
94 if (mail_queue->empty()) { 94 if (mail_queue->empty()) {
95 spu_write_out_mbox((uint32)data); 95 spu_write_out_mbox((uint32)data);
96 } else { 96 } else {
97 MailQueuePtr mail = mail_queue->poll(); 97 MailQueuePtr mail = mail_queue->poll();
98 if (mail == NULL) { 98 if (0 == mail->data) {
99 printf("あっるえぇー、おっかっしぃぞぉー\n"); 99 printf("hoge\n");
100 } 100 }
101 spu_write_out_mbox((uint32)mail->data); 101 spu_write_out_mbox((uint32)mail->data);
102 mail_queue->free_(mail); 102 mail_queue->free_(mail);
103 mail = mail_queue->create(); 103 mail = mail_queue->create();
104 mail->data = data; 104 mail->data = data;
157 157
158 158
159 CellDmaManager::CellDmaManager() 159 CellDmaManager::CellDmaManager()
160 { 160 {
161 161
162 mail_queue = new QueueInfo<MailQueue>(MailPool); 162 mail_queue = new QueueInfo<MailQueue>(MailPool);
163
164 stop_profile(); 163 stop_profile();
165 } 164 }
166 void 165 void
167 CellDmaManager::start_profile() 166 CellDmaManager::start_profile()
168 { 167 {