view TaskManager/Fifo/ReferencedDmaManager.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 186b0681bc87
children 94ac6d8e73aa
line wrap: on
line source

#include "ReferencedDmaManager.h"
#include "Scheduler.h"
#include "TaskManagerImpl.h"

void *
ReferencedDmaManager::dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask)
{
	unsigned long long wait = 0;
	(this->*start_dmawait_profile)();

	(this->*end_dmawait_profile)(&wait);
	global_load_time += wait;
	dma_load_time += wait;

	return (void*)addr;
}

void *
ReferencedDmaManager::dma_loadList(Scheduler *s, ListDataPtr list, void *buff, uint32 mask)
{
	unsigned long long wait = 0;
	(this->*start_dmawait_profile)();

	ListElementPtr elm = &list->element[0];

	(this->*end_dmawait_profile)(&wait);
	global_load_time += wait;
	dma_loadList_time += wait;

    return (void*)elm->addr; 
}

void
ReferencedDmaManager::free(void *buf) {
}