1
0
mirror of https://github.com/open-simh/simh.git synced 2026-05-03 22:58:53 +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

@@ -695,7 +695,7 @@ void dp_goc (int32 fnc, int32 drv, int32 time)
{
int32 t;
t = sim_is_active (&dpc_unit[drv]);
t = sim_activate_time (&dpc_unit[drv]);
if (t) { /* still seeking? */
sim_cancel (&dpc_unit[drv]); /* stop seek */
dpc_sta[drv] = dpc_sta[drv] & ~STA_BSY; /* clear busy */

View File

@@ -531,7 +531,7 @@ void dq_goc (int32 fnc, int32 drv, int32 time)
{
int32 t;
t = sim_is_active (&dqc_unit[drv]);
t = sim_activate_time (&dqc_unit[drv]);
if (t) { /* still seeking? */
sim_cancel (&dqc_unit[drv]); /* cancel */

View File

@@ -1021,7 +1021,7 @@ int32 sync_poll (POLLMODE poll_mode)
int32 poll_time;
if (poll_mode == INITIAL) {
poll_time = sim_is_active (&tty_unit[TTI]);
poll_time = sim_activate_time (&tty_unit[TTI]);
if (poll_time)
return poll_time;

View File

@@ -772,7 +772,7 @@ else if (uptr) { /* otherwise, we have a
uptr->wait = cvptr->cmd_time; /* most commands use the command delay */
if (props->unit_access) { /* does the command access the unit? */
is_seeking = sim_is_active (uptr) != 0; /* see if the unit is busy */
is_seeking = sim_activate_time (uptr) != 0; /* see if the unit is busy */
if (is_seeking) /* if a seek is in progress, */
uptr->wait = 0; /* set for no unit activation */