Previous 199869 Revisions Next

r31187 Friday 4th July, 2014 at 12:26:09 UTC by Alex Jackson
schedule.c: make yield() actually yield again, rather than be a synonym for spin() [Alex Jackson]
[src/emu]schedule.c

trunk/src/emu/schedule.c
r31186r31187
415415   bool call_debugger = ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0);
416416
417417   // build the execution list if we don't have one yet
418   if (m_execute_list == NULL)
418   if (UNEXPECTED(m_execute_list == NULL))
419419      rebuild_execute_list();
420420
421421   // if the current quantum has expired, find a new one
r31186r31187
439439      if (m_suspend_changes_pending)
440440         apply_suspend_changes();
441441
442      // loop over non-suspended CPUs
442      // loop over all CPUs
443443      for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec)
444444      {
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))
447448         {
448449            // compute how many attoseconds to execute this CPU
449450            attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team