Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/ppe/MailManager.cc @ 868:08ed5e750d78 draft
[aquarium]: update screen scope on linda with protobuf
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Jun 2010 16:10:28 +0900 |
parents | cc1b7333de92 |
children | 2e20d2bb55c6 |
comparison
equal
deleted
inserted
replaced
867:9b25de3bb8de | 868:08ed5e750d78 |
---|---|
13 } | 13 } |
14 | 14 |
15 MailManager::MailManager(unsigned int qsize) { | 15 MailManager::MailManager(unsigned int qsize) { |
16 read = write = 0; | 16 read = write = 0; |
17 calc_mask(qsize); | 17 calc_mask(qsize); |
18 queue = New(memaddr,size); | 18 queue = Newq(memaddr,size); |
19 } | 19 } |
20 | 20 |
21 MailManager::~MailManager() { free(queue); } | 21 MailManager::~MailManager() { free(queue); } |
22 | 22 |
23 int | 23 int |
27 } | 27 } |
28 | 28 |
29 void | 29 void |
30 MailManager::extend() | 30 MailManager::extend() |
31 { | 31 { |
32 memaddr *newq = New(memaddr,size*2); | 32 memaddr *newq = Newq(memaddr,size*2); |
33 unsigned int i = 0; | 33 unsigned int i = 0; |
34 while(i<size) { | 34 while(i<size) { |
35 newq[i++] = queue[read++]; | 35 newq[i++] = queue[read++]; |
36 read &= mask; | 36 read &= mask; |
37 } | 37 } |