This is the third in the series of patches that move the ThreadPlan stacks out of the Threads and lets the process manage them instead. The first two are:
This patch just moves the three thread plan stacks - current, discarded and completed - out of ThreadPlan and into the ThreadPlanStack class. This is a nice cleanup on its own as it gets all the thread plan manipulation logic out of Thread. Then the ThreadPlanStacks move out of Thread to Process where they are managed in a map ordered by TID.