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 |
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 |
311 VirtualPort *vp = new VirtualPort("tc-vport", src_tc); 312 Port *mem_port = getMemFuncPort(); |
313 |
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 |