Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/schedule/SchedTaskArray.cc @ 1413:5b024efa2429 draft
fix free on non copy DMA
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 19 Feb 2012 10:07:27 +0900 |
parents | 44d9b08519e0 |
children | 94ac6d8e73aa |
comparison
equal
deleted
inserted
replaced
1412:f40558ec00a8 | 1413:5b024efa2429 |
---|---|
103 outListData.element = atask->outData(0); | 103 outListData.element = atask->outData(0); |
104 free(outListData.bound); | 104 free(outListData.bound); |
105 outListData.bound = (int*)manager->allocate(outListData.length*sizeof(int)); | 105 outListData.bound = (int*)manager->allocate(outListData.length*sizeof(int)); |
106 connector->bound(&outListData); | 106 connector->bound(&outListData); |
107 | 107 |
108 free(writebuf); | 108 // connector->free(writebuf); what?! |
109 writebuf = connector->get_writebuf(scheduler, &outListData, outListData.size); | 109 writebuf = connector->get_writebuf(scheduler, &outListData, outListData.size); |
110 //if (outListData.element == inListData.element ) { | 110 //if (outListData.element == inListData.element ) { |
111 // printf("bad %x\n",outListData.element); | 111 // printf("bad %x\n",outListData.element); |
112 //} | 112 //} |
113 } | 113 } |
124 if (atask->outData_count > 0) { | 124 if (atask->outData_count > 0) { |
125 setup_outputData(); | 125 setup_outputData(); |
126 } | 126 } |
127 connector->dma_wait((DMA_READ + this->tag)); | 127 connector->dma_wait((DMA_READ + this->tag)); |
128 run(this, get_input(readbuf, 0), get_output(writebuf, 0)); | 128 run(this, get_input(readbuf, 0), get_output(writebuf, 0)); |
129 free(readbuf); | 129 connector->free(readbuf); |
130 // 書き込む領域がなければ無視 | 130 // 書き込む領域がなければ無視 |
131 | 131 |
132 // User 側で作る方法が必要... | 132 // User 側で作る方法が必要... |
133 | 133 |
134 if (atask->outData_count > 0) { | 134 if (atask->outData_count > 0) { |
144 void | 144 void |
145 SchedTaskArray::write() | 145 SchedTaskArray::write() |
146 { | 146 { |
147 | 147 |
148 connector->dma_wait(DMA_WRITE); | 148 connector->dma_wait(DMA_WRITE); |
149 free(writebuf); | 149 connector->free(writebuf); |
150 free(inListData.bound); | 150 free(inListData.bound); |
151 free(outListData.bound); | 151 free(outListData.bound); |
152 } | 152 } |
153 | 153 |
154 Task *SchedTaskArray::last() | 154 Task *SchedTaskArray::last() |