Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/SynchronizedMailManager.h @ 1531:4443d59a8210 draft
SDL.h in main.cc
author | yuhi@cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 07 Dec 2012 15:46:27 +0900 |
parents | 27e35b4098a4 |
children | f73ca57cdc81 |
line wrap: on
line source
#ifndef INCLUDED_SYNC_MAIL_MANAGER #define INCLUDED_SYNC_MAIL_MANAGER #include <pthread.h> #include "MailManager.h" #include "types.h" #include "Sem.h" class SynchronizedMailManager : public MailManager { public: /* constructor */ SynchronizedMailManager(unsigned int qsize = 32) ; ~SynchronizedMailManager(); /* functions */ void send(memaddr data); memaddr recv(); int count(); private: /* variables */ memaddr *queue; SemPtr queue_remain; SemPtr queue_count; unsigned int size; unsigned int read; unsigned int write; unsigned int mask; void calc_mask(unsigned int qsize); void extend(); } ; typedef SynchronizedMailManager *SynchronizedMailManagerPtr; #endif