Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Cell/SpeThreads.h @ 621:5b178db5988a
Cell fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 15 Nov 2009 03:34:18 +0900 |
parents | 7a41d2cb0a84 |
children | 8843edf37c0e |
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); | |
621 | 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
1d8b8a4ac453
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 |