comparison TaskManager/kernel/ppe/Threads.h @ 0:04e28d8d3c6f

first commit
author Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
date Mon, 08 Nov 2010 01:23:25 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:04e28d8d3c6f
1 #ifndef INCLUDED_THREADS
2 #define INCLUDED_THREADS
3
4 #include <pthread.h>
5 #include <base.h>
6
7
8 class Threads {
9 public:
10 BASE_NEW_DELETE(Threads);
11
12 /* constructor */
13 Threads(int num = 1) {};
14 virtual ~Threads() {};
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;
25 } ;
26
27 #endif