Mercurial > hg > Members > kono > Cerium
annotate 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 |
rev | line source |
---|---|
817 | 1 #ifndef INCLUDED_THREADS |
2 #define INCLUDED_THREADS | |
3 | |
4 #include <pthread.h> | |
895
bed529c55eda
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
824
diff
changeset
|
5 #include <base.h> |
817 | 6 |
7 | |
8 class Threads { | |
9 public: | |
895
bed529c55eda
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
824
diff
changeset
|
10 BASE_NEW_DELETE(Threads); |
bed529c55eda
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
824
diff
changeset
|
11 |
817 | 12 /* constructor */ |
824 | 13 Threads(int num = 1) {}; |
14 virtual ~Threads() {}; | |
817 | 15 |
16 /* functions */ | |
17 virtual void init() = 0; | |
18 virtual int get_mail(int speid, int count, memaddr *ret) = 0; // BLOCKING | |
19 virtual int has_mail(int speid, int count, memaddr *ret) = 0; // NONBLOCK | |
20 virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING | |
21 | |
22 /* variables */ | |
23 pthread_t *threads; | |
24 int cpu_num; | |
895
bed529c55eda
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
824
diff
changeset
|
25 } __attribute__ ((aligned (DEFAULT_ALIGNMENT))); |
817 | 26 |
27 #endif |