Mercurial > hg > Game > Cerium
annotate TaskManager/Cell/SpeThreads.h @ 501:7ddbe22d4cdb draft
Cell inData/outData DMA removal
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 18:20:33 +0900 |
parents | 0251d06467de |
children | 78c0cb72ea61 |
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); | |
244 | 22 int get_mail(int speid, int count, unsigned int* ret); // BLOCKING |
23 int check_mail(int speid, int count, unsigned int* ret); // NONBLOCK | |
24 void send_mail(int speid, int num, unsigned int *data); // BLOCKING | |
65 | 25 static void *spe_thread_run(void *arg); |
26 static void *frontend_thread_run(void *arg); | |
253
0c9c9906d777
usr_help_str is nessesary for example
tkaito@localhost.localdomain
parents:
244
diff
changeset
|
27 void add_output_tasklist(int command, unsigned int 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 |