Mercurial > hg > Game > Cerium
changeset 505:053da4e2e8bf draft
remove check in double linked list
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 20:07:47 +0900 |
parents | 3240aae3e89b |
children | 823532f263af 5641d121818e |
files | TaskManager/kernel/ppe/HTaskInfo.cc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/HTaskInfo.cc Sun Oct 11 19:38:17 2009 +0900 +++ b/TaskManager/kernel/ppe/HTaskInfo.cc Sun Oct 11 20:07:47 2009 +0900 @@ -107,11 +107,13 @@ void HTaskInfo::addLast(HTask* e) { +#ifdef CHECK if (find(e)) { fprintf(stderr,"Add duplicate task %0x\n",(int)e); return; // ... } +#endif e->next = first; e->prev = last; last->next = e; @@ -135,11 +137,13 @@ int HTaskInfo::remove(HTask* e) { +#ifdef CHECK if (!find(e)) { fprintf(stderr,"Remove non existing task %0x\n",(int)e); return 0; // ... } +#endif e->prev->next = e->next; e->next->prev = e->prev;