system.cc (5714:76abee886def) | system.cc (5718:323cfbfec1a4) |
---|---|
1/* 2 * Copyright (c) 2003-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; --- 152 unchanged lines hidden (view full) --- 161bool System::breakpoint() 162{ 163 if (remoteGDB.size()) 164 return remoteGDB[0]->breakpoint(); 165 return false; 166} 167 168int | 1/* 2 * Copyright (c) 2003-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; --- 152 unchanged lines hidden (view full) --- 161bool System::breakpoint() 162{ 163 if (remoteGDB.size()) 164 return remoteGDB[0]->breakpoint(); 165 return false; 166} 167 168int |
169System::registerThreadContext(ThreadContext *tc) | 169System::registerThreadContext(ThreadContext *tc, int assigned) |
170{ 171 int id; | 170{ 171 int id; |
172 for (id = 0; id < threadContexts.size(); id++) { 173 if (!threadContexts[id]) 174 break; | 172 if (assigned == -1) { 173 for (id = 0; id < threadContexts.size(); id++) { 174 if (!threadContexts[id]) 175 break; 176 } 177 178 if (threadContexts.size() <= id) 179 threadContexts.resize(id + 1); 180 } else { 181 if (threadContexts.size() <= assigned) 182 threadContexts.resize(assigned + 1); 183 id = assigned; |
175 } 176 | 184 } 185 |
177 if (threadContexts.size() <= id) 178 threadContexts.resize(id + 1); 179 | |
180 if (threadContexts[id]) 181 panic("Cannot have two CPUs with the same id (%d)\n", id); 182 183 threadContexts[id] = tc; 184 _numContexts++; 185 186 int port = getRemoteGDBPort(); 187 if (rgdb_enable && port) { --- 105 unchanged lines hidden --- | 186 if (threadContexts[id]) 187 panic("Cannot have two CPUs with the same id (%d)\n", id); 188 189 threadContexts[id] = tc; 190 _numContexts++; 191 192 int port = getRemoteGDBPort(); 193 if (rgdb_enable && port) { --- 105 unchanged lines hidden --- |