view TaskManager/kernel/ppe/SimpleTask.h @ 895:bed529c55eda

add alignment of classes in SPU width and height are automatically set in frame buffer API
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 16 Jul 2010 17:23:49 +0900
parents 96536163c0a0
children ad95be23c794
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)

    memaddr rbuf;
    memaddr wbuf;
    int  r_size;
    int  w_size;
    int  dm1;       //  sizeof(SimpleTask)==32
    int  dm2;


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; } 

} __attribute__ ((aligned (DEFAULT_ALIGNMENT)));

typedef SimpleTask *SimpleTaskPtr;

#endif