Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/SynchronizedMailManager.h @ 1546:61164c687b29 draft
fix GpuScheduler flip
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 05 Feb 2013 13:15:46 +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