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 tc->setContextId(system->registerThreadContext(tc)); |
289#if !FULL_SYSTEM |
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 |
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 --- |