simple_thread.cc (7723:ee4ac00d0774) | simple_thread.cc (7823:dac01f14f20f) |
---|---|
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; --- 220 unchanged lines hidden (view full) --- 229#endif 230 231void 232SimpleThread::activate(int delay) 233{ 234 if (status() == ThreadContext::Active) 235 return; 236 | 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; --- 220 unchanged lines hidden (view full) --- 229#endif 230 231void 232SimpleThread::activate(int delay) 233{ 234 if (status() == ThreadContext::Active) 235 return; 236 |
237 lastActivate = curTick; | 237 lastActivate = curTick(); |
238 239// if (status() == ThreadContext::Unallocated) { 240// cpu->activateWhenReady(_threadId); 241// return; 242// } 243 244 _status = ThreadContext::Active; 245 246 // status() == Suspended 247 cpu->activateContext(_threadId, delay); 248} 249 250void 251SimpleThread::suspend() 252{ 253 if (status() == ThreadContext::Suspended) 254 return; 255 | 238 239// if (status() == ThreadContext::Unallocated) { 240// cpu->activateWhenReady(_threadId); 241// return; 242// } 243 244 _status = ThreadContext::Active; 245 246 // status() == Suspended 247 cpu->activateContext(_threadId, delay); 248} 249 250void 251SimpleThread::suspend() 252{ 253 if (status() == ThreadContext::Suspended) 254 return; 255 |
256 lastActivate = curTick; 257 lastSuspend = curTick; | 256 lastActivate = curTick(); 257 lastSuspend = curTick(); |
258/* 259#if FULL_SYSTEM 260 // Don't change the status from active if there are pending interrupts 261 if (cpu->checkInterrupts()) { 262 assert(status() == ThreadContext::Active); 263 return; 264 } 265#endif --- 32 unchanged lines hidden --- | 258/* 259#if FULL_SYSTEM 260 // Don't change the status from active if there are pending interrupts 261 if (cpu->checkInterrupts()) { 262 assert(status() == ThreadContext::Active); 263 return; 264 } 265#endif --- 32 unchanged lines hidden --- |