comparison TaskManager/kernel/ppe/Threads.h @ 817:4e8fc627ed33

add CpuThreads.cc
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 May 2010 09:43:27 +0900
parents
children 19c6cdeb23d6
comparison
equal deleted inserted replaced
816:06715c1ea01f 817:4e8fc627ed33
1 #ifndef INCLUDED_THREADS
2 #define INCLUDED_THREADS
3
4 #include <pthread.h>
5
6
7 class Threads {
8 public:
9 /* constructor */
10 Threads(int num = 1);
11 virtual ~Threads();
12
13 /* functions */
14 virtual void init() = 0;
15 virtual int get_mail(int speid, int count, memaddr *ret) = 0; // BLOCKING
16 virtual int has_mail(int speid, int count, memaddr *ret) = 0; // NONBLOCK
17 virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING
18
19 /* variables */
20 pthread_t *threads;
21 thread_arg_t *args;
22 int cpu_num;
23 };
24
25 #endif