mirror of
https://github.com/simh/simh.git
synced 2026-01-26 12:02:14 +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:
@@ -402,7 +402,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -338,7 +338,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -854,7 +854,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -855,7 +855,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -672,7 +672,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -410,7 +410,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1464,7 +1464,7 @@ return;
|
||||
|
||||
void tmr_sched (int32 tmr)
|
||||
{
|
||||
int32 clk_time = sim_is_active (&clk_unit) - 1;
|
||||
int32 clk_time = sim_activate_time (&clk_unit) - 1;
|
||||
int32 tmr_time;
|
||||
|
||||
tmr_sav[tmr] = sim_grtime (); /* save intvl base */
|
||||
|
||||
Reference in New Issue
Block a user