view TaskManager/kernel/ppe/SimpleTask.h @ 638:671fca057ad3

hmmmm
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 19 Nov 2009 18:18:20 +0900
parents 0558abba673c
children 0692b08f1cd6
line wrap: on
line source

#ifndef INCLUDED_SIPMLE_TASK
#define INCLUDED_SIPMLE_TASK

#include "base.h"
#include "types.h"

#define MAX_PARAMS 8

class SimpleTask {
public: // variables

    BASE_NEW_DELETE(SimpleTask);
    int command;         // 4 byte
    memaddr self;         // 4 byte (or 8byte on 64bit mode)

#ifdef SIMPLE_TASK
    memaddr rbuf;
    memaddr wbuf;
    int  r_size;
    int  w_size;
#endif


public: // functions
    SimpleTask() {};

    SimpleTask(int r, memaddr read, int w, memaddr write) {
	r_size = r; rbuf = read;
	w_size = w; wbuf = write;
    };

    void set_input(memaddr i,int size) { r_size = size; rbuf= i; }
    void set_output(memaddr o,int size) { w_size = size; wbuf= o; } 

};

typedef SimpleTask *SimpleTaskPtr;

#endif