1
0
mirror of https://github.com/simh/simh.git synced 2026-01-26 04:01:38 +00:00

Change the semantics of sim_is_active to return a t_bool (which was 98% of how it was used), and added new sim_activate_time to return the time a unit will be activated (the value previously returned). This affected a handful of used of sim_is_active in device implementations which were adjusted to use the sim_activate_time API.

This commit is contained in:
Mark Pizzolato
2012-12-12 11:01:00 -08:00
parent 2b5ceae2be
commit a3b0dc38fd
19 changed files with 20 additions and 20 deletions

View File

@@ -1093,7 +1093,7 @@ t_stat rl_show_dstate (FILE *st, UNIT *uptr, int32 val, void *desc)
(uptr->STAT & RLDS_WGE) ? '1' : '0',
(uptr->STAT & RLDS_SPE) ? '1' : '0');
if (uptr->flags & UNIT_ATT) {
if ((cnt = sim_is_active (uptr)) != 0)
if ((cnt = sim_activate_time (uptr)) != 0)
fprintf (st, "FNC: %d, %d\n", uptr->FNC, cnt);
else
fputs ("FNC: none\n", st);

View File

@@ -462,7 +462,7 @@ int32 clk_cosched (int32 wait)
{
int32 t;
t = sim_is_active (&clk_unit);
t = sim_activate_time (&clk_unit);
return (t? t - 1: wait);
}

View File

@@ -822,7 +822,7 @@ return;
void tu_update_fs (int32 flg, int32 drv)
{
int32 act = sim_is_active (&tu_unit[drv]);
int32 act = sim_activate_time (&tu_unit[drv]);
tufs = (tufs & ~FS_DYN) | FS_FPR | flg;
if (tu_unit[drv].flags & UNIT_ATT) {