From 52ff37caa3dc434baa0468f13ac609430f078982 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:46 -0500 Subject: cpu: Fix broken thread context handover The thread context handover code used to break when multiple handovers were performed during the same quiesce period. Previously, the thread contexts would assign the TC pointer in the old quiesce event to the new TC. This obviously broke in cases where multiple switches were performed within the same quiesce period, in which case the TC pointer in the quiesce event would point to an old CPU. The new implementation deschedules pending quiesce events in the old TC and schedules a new quiesce event in the new TC. The code has been refactored to remove most of the code duplication. --- src/cpu/simple_thread.hh | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/cpu/simple_thread.hh') diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index ee54850ae..6f1173b7f 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -146,8 +146,6 @@ class SimpleThread : public ThreadState void regStats(const std::string &name); - void copyTC(ThreadContext *context); - void copyState(ThreadContext *oldContext); void serialize(std::ostream &os); -- cgit v1.2.3