Mercurial > hg > Members > kono > Cerium
view TaskManager/kernel/ppe/Threads.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 | 3468641f22d7 |
children | 586b4f825f24 |
line wrap: on
line source
#ifndef INCLUDED_THREADS #define INCLUDED_THREADS #include <pthread.h> #include <base.h> class Threads { public: BASE_NEW_DELETE(Threads); /* constructor */ Threads(int num = 1) {}; virtual ~Threads() {}; /* functions */ virtual void init() = 0; virtual int get_mail(int speid, int count, memaddr *ret) = 0; // BLOCKING virtual int has_mail(int speid, int count, memaddr *ret) = 0; // NONBLOCK virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING /* variables */ pthread_t *threads; int cpu_num; } __attribute__ ((aligned (DEFAULT_ALIGNMENT))); #endif