Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/MailManager.h @ 1189:898fdcf53c31 draft
add SemMailManager
author | Daichi TOMA |
---|---|
date | Fri, 08 Jul 2011 18:34:18 +0900 |
parents | 4c209dd223cd |
children | d28f0c5489c3 |
line wrap: on
line source
#ifndef INCLUDED_MAIL_MANAGER #define INCLUDED_MAIL_MANAGER #include "types.h" class MailManager { public: /* constructor */ MailManager(unsigned int qsize = 32) ; virtual ~MailManager(); /* functions */ virtual void send(memaddr data); virtual memaddr recv(); virtual int count(); private: /* variables */ memaddr *queue; unsigned int size; unsigned int read; unsigned int write; unsigned int mask; void calc_mask(unsigned int qsize); void extend(); } ; typedef MailManager *MailManagerPtr; #endif