mirror of
https://github.com/simh/simh.git
synced 2026-04-29 21:16:46 +00:00
PDP11, VAX: Fixed DZ race condition for multiple transmitters (Mark Pizzolato)
This commit is contained in:
committed by
Mark Pizzolato
parent
f39e7cd5cb
commit
fac557150d
@@ -1,6 +1,6 @@
|
|||||||
/* pdp11_dz.c: DZ11 terminal multiplexor simulator
|
/* pdp11_dz.c: DZ11 terminal multiplexor simulator
|
||||||
|
|
||||||
Copyright (c) 2001-2008, Robert M Supnik
|
Copyright (c) 2001-2020, Robert M Supnik
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
dz DZ11 terminal multiplexor
|
dz DZ11 terminal multiplexor
|
||||||
|
|
||||||
|
14-Feb-20 RMS Fixed race condition for multiple transmitters (Mark Pizzolato)
|
||||||
29-Dec-08 RMS Added MTAB_NC to SET LOG command (Walter Mueller)
|
29-Dec-08 RMS Added MTAB_NC to SET LOG command (Walter Mueller)
|
||||||
19-Nov-08 RMS Revised for common TMXR show routines
|
19-Nov-08 RMS Revised for common TMXR show routines
|
||||||
18-Jun-07 RMS Added UNIT_IDLE flag
|
18-Jun-07 RMS Added UNIT_IDLE flag
|
||||||
@@ -373,7 +374,8 @@ switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
|||||||
if (c >= 0) /* store char */
|
if (c >= 0) /* store char */
|
||||||
tmxr_putc_ln (lp, c);
|
tmxr_putc_ln (lp, c);
|
||||||
tmxr_poll_tx (&dz_desc); /* poll output */
|
tmxr_poll_tx (&dz_desc); /* poll output */
|
||||||
dz_update_xmti (); /* update int */
|
dz_csr[dz] &= ~CSR_TRDY; /* clear TRDY for now */
|
||||||
|
dz_update_xmti(); /* update int */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -474,16 +476,18 @@ void dz_update_xmti (void)
|
|||||||
int32 dz, linemask, i, j, line;
|
int32 dz, linemask, i, j, line;
|
||||||
|
|
||||||
for (dz = 0; dz < DZ_MUXES; dz++) { /* loop thru muxes */
|
for (dz = 0; dz < DZ_MUXES; dz++) { /* loop thru muxes */
|
||||||
linemask = dz_tcr[dz] & DZ_LMASK; /* enabled lines */
|
if ((dz_csr[dz] & CSR_TRDY) == 0) { /* xmiting? */
|
||||||
dz_csr[dz] &= ~CSR_TRDY; /* assume not rdy */
|
linemask = dz_tcr[dz] & DZ_LMASK; /* enabled lines */
|
||||||
j = CSR_GETTL (dz_csr[dz]); /* start at current */
|
dz_csr[dz] &= ~CSR_TRDY; /* assume not rdy */
|
||||||
for (i = 0; i < DZ_LINES; i++) { /* loop thru lines */
|
j = CSR_GETTL (dz_csr[dz]); /* start at current */
|
||||||
j = (j + 1) & DZ_LNOMASK; /* next line */
|
for (i = 0; i < DZ_LINES; i++) { /* loop thru lines */
|
||||||
line = (dz * DZ_LINES) + j; /* get line num */
|
j = (j + 1) & DZ_LNOMASK; /* next line */
|
||||||
if ((linemask & (1 << j)) && dz_ldsc[line].xmte) {
|
line = (dz * DZ_LINES) + j; /* get line num */
|
||||||
CSR_PUTTL (dz_csr[dz], j); /* put ln in csr */
|
if ((linemask & (1 << j)) && dz_ldsc[line].xmte) {
|
||||||
dz_csr[dz] |= CSR_TRDY; /* set xmt rdy */
|
CSR_PUTTL(dz_csr[dz], j); /* put ln in csr */
|
||||||
break;
|
dz_csr[dz] |= CSR_TRDY; /* set xmt rdy */
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((dz_csr[dz] & CSR_TIE) && (dz_csr[dz] & CSR_TRDY)) /* ready plus int? */
|
if ((dz_csr[dz] & CSR_TIE) && (dz_csr[dz] & CSR_TRDY)) /* ready plus int? */
|
||||||
|
|||||||
Reference in New Issue
Block a user