annotate TaskManager/kernel/ppe/SemMailManager.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 898fdcf53c31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1189
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
1 #ifndef INCLUDED_SEM_MAIL_MANAGER
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
2 #define INCLUDED_SEM_MAIL_MANAGER
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
3
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
4 #include <pthread.h>
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
5 #include "MailManager.h"
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
6 #include "types.h"
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
7 #include "Sem.h"
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
8
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
9 class SemMailManager : public MailManager {
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
10 public:
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
11 /* constructor */
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
12 SemMailManager(unsigned int qsize = 32) ;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
13
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
14 ~SemMailManager();
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
15
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
16 /* functions */
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
17 void send(memaddr data);
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
18 memaddr recv();
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
19 int count();
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
20
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
21 private:
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
22 /* variables */
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
23 memaddr *queue;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
24 SemPtr queue_remain;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
25 SemPtr queue_count;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
26 unsigned int size;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
27 unsigned int read;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
28 unsigned int write;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
29 unsigned int mask;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
30
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
31 void calc_mask(unsigned int qsize);
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
32 void extend();
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
33 } ;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
34
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
35 typedef SemMailManager *SemMailManagerPtr;
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
36
898fdcf53c31 add SemMailManager
Daichi TOMA
parents:
diff changeset
37 #endif