Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/ppe/MailManager.h @ 643:bffdede05f1e
minor fix.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 Nov 2009 10:57:37 +0900 |
parents | a909c50081c2 |
children | 7c9ded1ea750 |
rev | line source |
---|---|
3 | 1 #ifndef INCLUDED_MAIL_MANAGER |
2 #define INCLUDED_MAIL_MANAGER | |
3 | |
605
90c61fe2b109
working on 32 bit compiler
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
603
diff
changeset
|
4 #include "types.h" |
90c61fe2b109
working on 32 bit compiler
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
603
diff
changeset
|
5 |
3 | 6 typedef struct mail_queue { |
603
42c94f85c779
long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
602
diff
changeset
|
7 memaddr data; |
3 | 8 struct mail_queue *next; |
9 } MailQueue, *MailQueuePtr; | |
10 | |
11 class MailManager { | |
12 public: | |
19 | 13 /* constructor */ |
603
42c94f85c779
long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
602
diff
changeset
|
14 MailManager(); |
42c94f85c779
long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
602
diff
changeset
|
15 ~MailManager(); |
19 | 16 |
3 | 17 /* functions */ |
50 | 18 int init(int num); |
603
42c94f85c779
long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
602
diff
changeset
|
19 MailQueuePtr create(memaddr data); |
50 | 20 void free(MailQueuePtr q); |
21 static MailQueuePtr append_mailQueue(MailQueuePtr list, MailQueuePtr q); | |
640
a909c50081c2
SimpeTask on Cell worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
605
diff
changeset
|
22 static int length(MailQueuePtr list); |
643 | 23 static int find(MailQueuePtr q,MailQueuePtr list); |
3 | 24 |
25 private: | |
26 /* variables */ | |
27 MailQueuePtr mailQueuePool; | |
28 MailQueuePtr freeMailQueue; | |
50 | 29 |
30 /* functions */ | |
31 int extend_pool(int num); | |
603
42c94f85c779
long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
602
diff
changeset
|
32 void destroy(); |
3 | 33 }; |
34 | |
35 #endif |