annotate include/TaskManager/SpeThreads.h @ 132:9550e4ce2868 draft

add XML
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 25 Nov 2008 18:19:53 +0900
parents 028ffc9c0375
children e9735a64cd90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
65
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_SPE_THREADS
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_SPE_THREADS
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
3
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
4 #include <libspe2.h>
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
5 #include <pthread.h>
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
6
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
7 #define SPE_ELF "spe-main"
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
8
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
9 typedef struct arg {
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
10 int speid;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
11 spe_context_ptr_t ctx;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
12 } thread_arg_t;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
13
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
14 class SpeThreads {
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
15 public:
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
16 /* constructor */
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
17 SpeThreads(int num = 1);
76
5a1a5f4c28fd *** empty log message ***
gongo
parents: 66
diff changeset
18 ~SpeThreads(void);
65
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
19
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
20 /* functions */
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
21 void init(void);
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
22 int get_mail(int speid);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 76
diff changeset
23 void send_mail(int speid, unsigned int *data, int num);
65
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
24 static void *spe_thread_run(void *arg);
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
25 static void *frontend_thread_run(void *arg);
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
26
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
27 private:
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
28 /* variables */
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
29 spe_program_handle_t *spe_handle;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
30 spe_context_ptr_t *spe_ctx;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
31 pthread_t *threads;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
32 thread_arg_t *args;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
33 int spe_num;
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
34 };
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
35
519d24aa7ac8 *** empty log message ***
gongo
parents:
diff changeset
36 #endif