Mercurial > hg > Members > kono > Cerium
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/kernel/ppe/Threads.h Sun May 23 09:43:27 2010 +0900 @@ -0,0 +1,25 @@ +#ifndef INCLUDED_THREADS +#define INCLUDED_THREADS + +#include <pthread.h> + + +class Threads { +public: + /* constructor */ + Threads(int num = 1); + virtual ~Threads(); + + /* functions */ + virtual void init() = 0; + virtual int get_mail(int speid, int count, memaddr *ret) = 0; // BLOCKING + virtual int has_mail(int speid, int count, memaddr *ret) = 0; // NONBLOCK + virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING + + /* variables */ + pthread_t *threads; + thread_arg_t *args; + int cpu_num; +}; + +#endif