Mercurial > hg > Members > e085722 > Cerium
view include/TaskManager/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 |
line wrap: on
line source
#ifndef INCLUDED_THREADS #define INCLUDED_THREADS #include <pthread.h> #include <base.h> class Threads { public: BASE_NEW_DELETE(Threads); /* 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; int cpu_num; } ; #endif