Deleted Added
sdiff udiff text old ( 9346:7a9b5e0335a6 ) new ( 9430:a113f27b68bd )
full compact
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 214 unchanged lines hidden (view full) ---

223def switchCpus(cpuList):
224 print "switching cpus"
225 if not isinstance(cpuList, list):
226 raise RuntimeError, "Must pass a list to this function"
227 for item in cpuList:
228 if not isinstance(item, tuple) or len(item) != 2:
229 raise RuntimeError, "List must have tuples of (oldCPU,newCPU)"
230
231 for old_cpu, new_cpu in cpuList:
232 if not isinstance(old_cpu, objects.BaseCPU):
233 raise TypeError, "%s is not of type BaseCPU" % old_cpu
234 if not isinstance(new_cpu, objects.BaseCPU):
235 raise TypeError, "%s is not of type BaseCPU" % new_cpu
236
237 # Now all of the CPUs are ready to be switched out
238 for old_cpu, new_cpu in cpuList:
239 old_cpu.switchOut()
240
241 for old_cpu, new_cpu in cpuList:
242 new_cpu.takeOverFrom(old_cpu)
243
244from internal.core import disableAllListeners