view TaskManager/kernel/schedule/SchedMail.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 3f2230d79eba
line wrap: on
line source

#include "SchedMail.h"
#include "SchedTaskList.h"
#include "SchedExit.h"
#include "error.h"

SchedTaskBase*
SchedMail::next(Scheduler *scheduler, SchedTaskBase *p)
{
    
    connector = scheduler->connector;
    params_addr = connector->task_list_mail_read();

    __debug("[SchedMail:%s]\n", __FUNCTION__);

    if ((memaddr)params_addr == (memaddr)MY_SPE_COMMAND_EXIT) {
	return new SchedExit();
    } else {
        int dma_tag_switch = 0;
	return new SchedTaskList(params_addr, scheduler, dma_tag_switch);
    }
}