trunk/src/emu/schedule.c
| r31186 | r31187 | |
| 415 | 415 | bool call_debugger = ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0); |
| 416 | 416 | |
| 417 | 417 | // build the execution list if we don't have one yet |
| 418 | | if (m_execute_list == NULL) |
| 418 | if (UNEXPECTED(m_execute_list == NULL)) |
| 419 | 419 | rebuild_execute_list(); |
| 420 | 420 | |
| 421 | 421 | // if the current quantum has expired, find a new one |
| r31186 | r31187 | |
| 439 | 439 | if (m_suspend_changes_pending) |
| 440 | 440 | apply_suspend_changes(); |
| 441 | 441 | |
| 442 | | // loop over non-suspended CPUs |
| 442 | // loop over all CPUs |
| 443 | 443 | for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec) |
| 444 | 444 | { |
| 445 | | // only process if our target is later than the CPU's current time (coarse check) |
| 446 | | if (target.seconds >= exec->m_localtime.seconds) |
| 445 | // only process if this CPU is executing or truly halted (not yielding) |
| 446 | // and if our target is later than the CPU's current time (coarse check) |
| 447 | if (EXPECTED((exec->m_suspend == 0 || exec->m_eatcycles) && target.seconds >= exec->m_localtime.seconds)) |
| 447 | 448 | { |
| 448 | 449 | // compute how many attoseconds to execute this CPU |
| 449 | 450 | attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds; |