a brand new MessageQueue for SurfaceFlinger.

This commit is contained in:
Mathias Agopian 2009-04-20 19:39:12 -07:00 committed by Alex Ray
parent d8c95cc027
commit 76f6b453a2

View file

@ -117,13 +117,22 @@ public:
mFirst = mLast = newNode;
newNode->prev = newNode->next = 0;
} else {
insertBefore(mFirst, newNode);
newNode->prev = 0;
newNode->next = mFirst;
mFirst->prev = newNode;
mFirst = newNode;
}
}
void insertTail(NODE* newNode) {
if (mLast == 0) insertBeginning(newNode);
else insertAfter(mLast, newNode);
if (mLast == 0) {
insertHead(newNode);
} else {
newNode->prev = mLast;
newNode->next = 0;
mLast->next = newNode;
mLast = newNode;
}
}
NODE* remove(NODE* node) {