diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-09-14 03:43:04 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-09-14 03:43:04 +0000 |
commit | e3d492b3f7f5c906c1ab2842bbf4088bfef35b8b (patch) | |
tree | 835d513024c2f20c6ea3119c1d5ac0efb64fd83d /sys/arch/hp300/dev/apci.c | |
parent | 1fd023d3aba9d5ae55383a5792fe56d7e2217c43 (diff) |
callout support sync, from Theo.
Diffstat (limited to 'sys/arch/hp300/dev/apci.c')
-rw-r--r-- | sys/arch/hp300/dev/apci.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c index abc5e0b778d..f43514d25ee 100644 --- a/sys/arch/hp300/dev/apci.c +++ b/sys/arch/hp300/dev/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.2 1997/07/14 04:25:12 downsj Exp $ */ +/* $OpenBSD: apci.c,v 1.3 1997/09/14 03:43:01 downsj Exp $ */ /* $NetBSD: apci.c,v 1.1 1997/05/12 08:12:36 thorpej Exp $ */ /* @@ -341,18 +341,22 @@ apciopen(dev, flag, mode, p) return (EBUSY); } } else { - while (!(APCICUA(dev) && sc->sc_cua) && - (tp->t_cflag & CLOCAL) == 0 && - (tp->t_state & TS_CARR_ON) == 0) { + while (sc->sc_cua || + ((tp->t_cflag & CLOCAL) == 0 && + (tp->t_state & TS_CARR_ON) == 0)) { tp->t_state |= TS_WOPEN; error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI | PCATCH, ttopen, 0); + if (!APCICUA(dev) && sc->sc_cua && error == EINTR) + continue; if (error) { if (APCICUA(dev)) sc->sc_cua = 0; splx(s); return (error); } + if (!APCICUA(dev) && sc->sc_cua) + continue; } } |