simple_thread.cc (3565:6ad587fb7dfd) | simple_thread.cc (3673:34386ba8cb41) |
---|---|
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; --- 77 unchanged lines hidden (view full) --- 86 profileNode = &dummyNode; 87 profilePC = 3; 88 89 if (use_kernel_stats) { 90 kernelStats = new TheISA::Kernel::Statistics(system); 91 } else { 92 kernelStats = NULL; 93 } | 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; --- 77 unchanged lines hidden (view full) --- 86 profileNode = &dummyNode; 87 profilePC = 3; 88 89 if (use_kernel_stats) { 90 kernelStats = new TheISA::Kernel::Statistics(system); 91 } else { 92 kernelStats = NULL; 93 } |
94 Port *mem_port; 95 physPort = new FunctionalPort(csprintf("%s-%d-funcport", 96 cpu->name(), tid)); 97 mem_port = system->physmem->getPort("functional"); 98 mem_port->setPeer(physPort); 99 physPort->setPeer(mem_port); 100 101 virtPort = new VirtualPort(csprintf("%s-%d-vport", 102 cpu->name(), tid)); 103 mem_port = system->physmem->getPort("functional"); 104 mem_port->setPeer(virtPort); 105 virtPort->setPeer(mem_port); | |
106} 107#else 108SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, 109 Process *_process, int _asid) 110 : ThreadState(_cpu, -1, _thread_num, _process, _asid), 111 cpu(_cpu) 112{ 113 regs.clear(); 114 tc = new ProxyThreadContext<SimpleThread>(this); 115} 116 117#endif 118 | 94} 95#else 96SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, 97 Process *_process, int _asid) 98 : ThreadState(_cpu, -1, _thread_num, _process, _asid), 99 cpu(_cpu) 100{ 101 regs.clear(); 102 tc = new ProxyThreadContext<SimpleThread>(this); 103} 104 105#endif 106 |
107#if FULL_SYSTEM 108void 109SimpleThread::init() 110{ 111 Port *mem_port; 112 physPort = new FunctionalPort(csprintf("%s-%d-funcport", 113 cpu->name(), tid)); 114 mem_port = getMemFuncPort(); 115 mem_port->setPeer(physPort); 116 physPort->setPeer(mem_port); 117 118 virtPort = new VirtualPort(csprintf("%s-%d-vport", 119 cpu->name(), tid)); 120 mem_port = getMemFuncPort(); 121 mem_port->setPeer(virtPort); 122 virtPort->setPeer(mem_port); 123} 124#endif 125 |
|
119SimpleThread::SimpleThread() 120#if FULL_SYSTEM 121 : ThreadState(NULL, -1, -1) 122#else 123 : ThreadState(NULL, -1, -1, NULL, -1) 124#endif 125{ 126 tc = new ProxyThreadContext<SimpleThread>(this); --- 203 unchanged lines hidden --- | 126SimpleThread::SimpleThread() 127#if FULL_SYSTEM 128 : ThreadState(NULL, -1, -1) 129#else 130 : ThreadState(NULL, -1, -1, NULL, -1) 131#endif 132{ 133 tc = new ProxyThreadContext<SimpleThread>(this); --- 203 unchanged lines hidden --- |