Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/Threads.h @ 1181:fa380908f801 draft
succcess to run parallel task manager
author | Daichi TOMA |
---|---|
date | Mon, 27 Jun 2011 03:03:55 +0900 |
parents | 5393bebe0956 |
children | 26dea600d4cd |
line wrap: on
line source
#ifndef INCLUDED_THREADS #define INCLUDED_THREADS #include <pthread.h> #include "base.h" #include "types.h" class Threads { public: BASE_NEW_DELETE(Threads); /* constructor */ Threads(int num = 1) {}; virtual ~Threads() {}; /* functions */ //virtual void init() = 0; virtual void init() {}; 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