- if (use_kernel_stats) {
- kernelStats = new Kernel::Statistics(system);
- } else {
- kernelStats = NULL;
- }
- Port *mem_port;
- physPort = new FunctionalPort(csprintf("%s-%d-funcport",
- cpu->name(), tid));
- mem_port = system->physmem->getPort("functional");
- mem_port->setPeer(physPort);
- physPort->setPeer(mem_port);
-
- virtPort = new VirtualPort(csprintf("%s-%d-vport",
- cpu->name(), tid));
- mem_port = system->physmem->getPort("functional");
- mem_port->setPeer(virtPort);
- virtPort->setPeer(mem_port);
-}
-#else
-SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num,
- Process *_process, int _asid)
- : ThreadState(_cpu, -1, _thread_num, _process, _asid),
- cpu(_cpu)
-{
- regs.clear();
- tc = new ProxyThreadContext<SimpleThread>(this);
-}
-
-#endif
-
-SimpleThread::SimpleThread()
-#if FULL_SYSTEM
- : ThreadState(NULL, -1, -1)
-#else
- : ThreadState(NULL, -1, -1, NULL, -1)
-#endif
-{
- tc = new ProxyThreadContext<SimpleThread>(this);
- regs.clear();