Deleted Added
sdiff udiff text old ( 9384:877293183bdf ) new ( 9430:a113f27b68bd )
full compact
1/*
2 * Copyright (c) 2011-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

114 return "CPU Progress";
115}
116
117BaseCPU::BaseCPU(Params *p, bool is_checker)
118 : MemObject(p), instCnt(0), _cpuId(p->cpu_id),
119 _instMasterId(p->system->getMasterId(name() + ".inst")),
120 _dataMasterId(p->system->getMasterId(name() + ".data")),
121 _taskId(ContextSwitchTaskId::Unknown), _pid(Request::invldPid),
122 interrupts(p->interrupts), profileEvent(NULL),
123 numThreads(p->numThreads), system(p->system)
124{
125 // if Python did not provide a valid ID, do it here
126 if (_cpuId == -1 ) {
127 _cpuId = cpuList.size();
128 }
129

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

351 return tid;
352 }
353 return 0;
354}
355
356void
357BaseCPU::switchOut()
358{
359 if (profileEvent && profileEvent->scheduled())
360 deschedule(profileEvent);
361}
362
363void
364BaseCPU::takeOverFrom(BaseCPU *oldCPU)
365{
366 assert(threadContexts.size() == oldCPU->threadContexts.size());
367 assert(_cpuId == oldCPU->cpuId());
368 _pid = oldCPU->getPid();
369 _taskId = oldCPU->taskId();
370
371 ThreadID size = threadContexts.size();
372 for (ThreadID i = 0; i < size; ++i) {
373 ThreadContext *newTC = threadContexts[i];
374 ThreadContext *oldTC = oldCPU->threadContexts[i];
375
376 newTC->takeOverFrom(oldTC);
377

--- 187 unchanged lines hidden ---