1
0
mirror of https://github.com/simh/simh.git synced 2026-04-25 11:41:25 +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

@@ -154,7 +154,7 @@ tempbase[1] = tim_base[1];
if (tim_mult != TIM_MULT_T20) { /* interpolate? */
int32 used;
d10 incr;
used = tmr_poll - (sim_is_active (&tim_unit) - 1);
used = tmr_poll - (sim_activate_time (&tim_unit) - 1);
incr = (d10) (((double) used * TIM_HW_FREQ) /
((double) tmr_poll * (double) clk_tps));
tim_incr_base (tempbase, incr);
@@ -219,7 +219,7 @@ int32 t;
if (tim_mult == TIM_MULT_T20)
return wait;
t = sim_is_active (&tim_unit);
t = sim_activate_time (&tim_unit);
return (t? t - 1: wait);
}