simple_thread.cc (3485:ac89a047e5b6) | simple_thread.cc (3486:11b71489efd6) |
---|---|
1/* 2 * Copyright (c) 2001-2006 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; --- 115 unchanged lines hidden (view full) --- 124#endif 125{ 126 tc = new ProxyThreadContext<SimpleThread>(this); 127 regs.clear(); 128} 129 130SimpleThread::~SimpleThread() 131{ | 1/* 2 * Copyright (c) 2001-2006 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; --- 115 unchanged lines hidden (view full) --- 124#endif 125{ 126 tc = new ProxyThreadContext<SimpleThread>(this); 127 regs.clear(); 128} 129 130SimpleThread::~SimpleThread() 131{ |
132#if FULL_SYSTEM 133 delete physPort; 134 delete virtPort; 135#endif |
|
132 delete tc; 133} 134 135void 136SimpleThread::takeOverFrom(ThreadContext *oldContext) 137{ 138 // some things should already be set up 139#if FULL_SYSTEM --- 159 unchanged lines hidden (view full) --- 299 300#if FULL_SYSTEM 301VirtualPort* 302SimpleThread::getVirtPort(ThreadContext *src_tc) 303{ 304 if (!src_tc) 305 return virtPort; 306 | 136 delete tc; 137} 138 139void 140SimpleThread::takeOverFrom(ThreadContext *oldContext) 141{ 142 // some things should already be set up 143#if FULL_SYSTEM --- 159 unchanged lines hidden (view full) --- 303 304#if FULL_SYSTEM 305VirtualPort* 306SimpleThread::getVirtPort(ThreadContext *src_tc) 307{ 308 if (!src_tc) 309 return virtPort; 310 |
307 VirtualPort *vp; 308 Port *mem_port; | 311 VirtualPort *vp = new VirtualPort("tc-vport", src_tc); 312 Port *mem_port = getMemFuncPort(); |
309 | 313 |
310 vp = new VirtualPort("tc-vport", src_tc); 311 mem_port = system->physmem->getPort("functional"); | |
312 mem_port->setPeer(vp); 313 vp->setPeer(mem_port); 314 return vp; 315} 316 317void 318SimpleThread::delVirtPort(VirtualPort *vp) 319{ 320 if (vp != virtPort) { 321 delete vp->getPeer(); 322 delete vp; 323 } 324} 325 326#endif 327 | 314 mem_port->setPeer(vp); 315 vp->setPeer(mem_port); 316 return vp; 317} 318 319void 320SimpleThread::delVirtPort(VirtualPort *vp) 321{ 322 if (vp != virtPort) { 323 delete vp->getPeer(); 324 delete vp; 325 } 326} 327 328#endif 329 |