base.cc (5713:993c7952b930) base.cc (5714:76abee886def)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

280}
281
282void
283BaseCPU::registerThreadContexts()
284{
285 for (int i = 0; i < threadContexts.size(); ++i) {
286 ThreadContext *tc = threadContexts[i];
287
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

280}
281
282void
283BaseCPU::registerThreadContexts()
284{
285 for (int i = 0; i < threadContexts.size(); ++i) {
286 ThreadContext *tc = threadContexts[i];
287
288 system->registerThreadContext(tc);
288 tc->setContextId(system->registerThreadContext(tc));
289#if !FULL_SYSTEM
289#if !FULL_SYSTEM
290 tc->getProcessPtr()->assignThreadContext(tc->cpuId());
290 tc->getProcessPtr()->assignThreadContext(tc->contextId());
291#endif
292 }
293}
294
295
296int
297BaseCPU::findContext(ThreadContext *tc)
298{

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

323 for (int i = 0; i < threadContexts.size(); ++i) {
324 ThreadContext *newTC = threadContexts[i];
325 ThreadContext *oldTC = oldCPU->threadContexts[i];
326
327 newTC->takeOverFrom(oldTC);
328
329 CpuEvent::replaceThreadContext(oldTC, newTC);
330
291#endif
292 }
293}
294
295
296int
297BaseCPU::findContext(ThreadContext *tc)
298{

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

323 for (int i = 0; i < threadContexts.size(); ++i) {
324 ThreadContext *newTC = threadContexts[i];
325 ThreadContext *oldTC = oldCPU->threadContexts[i];
326
327 newTC->takeOverFrom(oldTC);
328
329 CpuEvent::replaceThreadContext(oldTC, newTC);
330
331 assert(newTC->cpuId() == oldTC->cpuId());
332 system->replaceThreadContext(newTC, newTC->cpuId());
331 assert(newTC->contextId() == oldTC->contextId());
332 system->replaceThreadContext(newTC, newTC->contextId());
333
334 if (DTRACE(Context))
335 ThreadContext::compare(oldTC, newTC);
336 }
337
338#if FULL_SYSTEM
339 interrupts = oldCPU->interrupts;
340

--- 100 unchanged lines hidden ---
333
334 if (DTRACE(Context))
335 ThreadContext::compare(oldTC, newTC);
336 }
337
338#if FULL_SYSTEM
339 interrupts = oldCPU->interrupts;
340

--- 100 unchanged lines hidden ---