view TaskManager/kernel/schedule/SchedMail.cc @ 1546:61164c687b29 draft

fix GpuScheduler flip
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Tue, 05 Feb 2013 13:15:46 +0900
parents 3f2230d79eba
children f82bb7393c4d
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;
    memaddr params_addr = connector->task_list_mail_read();

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

    if (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);
    }
}