Author: bonefish Date: 2011-05-25 20:24:21 +0200 (Wed, 25 May 2011) New Revision: 41749 Changeset: https://dev.haiku-os.org/changeset/41749 Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/TeamThreadTables.h Log: TeamThreadTable::NextElement(): Insert the iterator entry after the found entry as the comment says. Fixes infinite loop when actually using a {Team,Thread}ListIterator. Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/TeamThreadTables.h =================================================================== --- haiku/branches/developer/bonefish/signals/src/system/kernel/TeamThreadTables.h 2011-05-25 18:21:54 UTC (rev 41748) +++ haiku/branches/developer/bonefish/signals/src/system/kernel/TeamThreadTables.h 2011-05-25 18:24:21 UTC (rev 41749) @@ -130,7 +130,7 @@ // found an element -- requeue entry after element Element* element = static_cast<Element*>(nextEntry); fList.Remove(entry); - fList.Insert(nextEntry, entry); + fList.InsertAfter(nextEntry, entry); return element; } }