process.cc (5958:2d9737bf3c2f) | process.cc (6029:007c36616f47) |
---|---|
1/* 2 * Copyright (c) 2001-2005 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; --- 207 unchanged lines hidden (view full) --- 216 217ThreadContext * 218Process::findFreeContext() 219{ 220 int size = contextIds.size(); 221 ThreadContext *tc; 222 for (int i = 0; i < size; ++i) { 223 tc = system->getThreadContext(contextIds[i]); | 1/* 2 * Copyright (c) 2001-2005 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; --- 207 unchanged lines hidden (view full) --- 216 217ThreadContext * 218Process::findFreeContext() 219{ 220 int size = contextIds.size(); 221 ThreadContext *tc; 222 for (int i = 0; i < size; ++i) { 223 tc = system->getThreadContext(contextIds[i]); |
224 if (tc->status() == ThreadContext::Unallocated) { | 224 if (tc->status() == ThreadContext::Halted) { |
225 // inactive context, free to use 226 return tc; 227 } 228 } 229 return NULL; 230} 231 232void --- 537 unchanged lines hidden --- | 225 // inactive context, free to use 226 return tc; 227 } 228 } 229 return NULL; 230} 231 232void --- 537 unchanged lines hidden --- |