SCP: Fix initialization of sim_time and sim_interval when queue is emptied
This commit is contained in:
parent
564ce2b3f4
commit
fa700d0494
1 changed files with 4 additions and 4 deletions
8
scp.c
8
scp.c
|
@ -8081,11 +8081,10 @@ t_stat sim_run_boot_prep (int32 flag)
|
||||||
{
|
{
|
||||||
t_stat r;
|
t_stat r;
|
||||||
|
|
||||||
sim_interval = 0; /* reset queue */
|
/* reset queue */
|
||||||
sim_time = sim_rtime = 0;
|
|
||||||
noqueue_time = 0; /* reset queue */
|
|
||||||
while (sim_clock_queue != QUEUE_LIST_END)
|
while (sim_clock_queue != QUEUE_LIST_END)
|
||||||
sim_cancel (sim_clock_queue);
|
sim_cancel (sim_clock_queue);
|
||||||
|
sim_time = sim_rtime = 0;
|
||||||
noqueue_time = sim_interval = 0;
|
noqueue_time = sim_interval = 0;
|
||||||
r = reset_all (0);
|
r = reset_all (0);
|
||||||
if ((r == SCPE_OK) && (flag == RU_RUN)) {
|
if ((r == SCPE_OK) && (flag == RU_RUN)) {
|
||||||
|
@ -10960,7 +10959,8 @@ if (!uptr->next)
|
||||||
uptr->usecs_remaining = 0;
|
uptr->usecs_remaining = 0;
|
||||||
if (sim_clock_queue != QUEUE_LIST_END)
|
if (sim_clock_queue != QUEUE_LIST_END)
|
||||||
sim_interval = sim_clock_queue->time;
|
sim_interval = sim_clock_queue->time;
|
||||||
else sim_interval = noqueue_time = NOQUEUE_WAIT;
|
else
|
||||||
|
sim_interval = noqueue_time = NOQUEUE_WAIT;
|
||||||
if (uptr->next) {
|
if (uptr->next) {
|
||||||
sim_printf ("Cancel failed for %s\n", sim_uname(uptr));
|
sim_printf ("Cancel failed for %s\n", sim_uname(uptr));
|
||||||
if (sim_deb)
|
if (sim_deb)
|
||||||
|
|
Loading…
Add table
Reference in a new issue