Mercurial > hg > Game > Cerium
annotate TaskManager/Cell/SpeThreads.h @ 631:30dd8a3deb4a draft
Cell 64 bit tried, but not yet worked.
Cell's list DMA is 32bit.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Nov 2009 13:32:58 +0900 |
parents | 64e05530e333 |
children | 7ba4ad4538b1 |
rev | line source |
---|---|
65 | 1 #ifndef INCLUDED_SPE_THREADS |
2 #define INCLUDED_SPE_THREADS | |
3 | |
4 #include <libspe2.h> | |
5 #include <pthread.h> | |
6 | |
7 #define SPE_ELF "spe-main" | |
8 | |
9 typedef struct arg { | |
10 int speid; | |
11 spe_context_ptr_t ctx; | |
12 } thread_arg_t; | |
13 | |
14 class SpeThreads { | |
15 public: | |
16 /* constructor */ | |
17 SpeThreads(int num = 1); | |
76 | 18 ~SpeThreads(void); |
65 | 19 |
20 /* functions */ | |
21 void init(void); | |
631
30dd8a3deb4a
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
22 int get_mail(int speid, int count, memaddr *ret); // BLOCKING |
30dd8a3deb4a
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
23 int check_mail(int speid, int count, memaddr *ret); // NONBLOCK |
30dd8a3deb4a
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
24 void send_mail(int speid, int num, memaddr *data); // BLOCKING |
65 | 25 static void *spe_thread_run(void *arg); |
26 static void *frontend_thread_run(void *arg); | |
631
30dd8a3deb4a
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
621
diff
changeset
|
27 void add_output_tasklist(int command, memaddr buff, int alloc_size); |
65 | 28 |
29 private: | |
30 /* variables */ | |
31 spe_program_handle_t *spe_handle; | |
32 spe_context_ptr_t *spe_ctx; | |
33 pthread_t *threads; | |
34 thread_arg_t *args; | |
35 int spe_num; | |
36 }; | |
37 | |
38 #endif |