rc.c (9626) | rc.c (9639) |
---|---|
1/* 2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. 3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 811 unchanged lines hidden (view full) --- 820 ttsetwater(tp); 821 822 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev)) 823 (*linesw[tp->t_line].l_modem)(tp, 1); 824 } 825 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev) 826 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) { 827 rc->rc_dcdwaits++; | 1/* 2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. 3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 811 unchanged lines hidden (view full) --- 820 ttsetwater(tp); 821 822 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev)) 823 (*linesw[tp->t_line].l_modem)(tp, 1); 824 } 825 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev) 826 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) { 827 rc->rc_dcdwaits++; |
828 error = tsleep(&tp->t_rawq, TTIPRI | PCATCH, "rcdcd", 0); | 828 error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0); |
829 rc->rc_dcdwaits--; 830 if (error != 0) 831 goto out; 832 goto again; 833 } 834 error = (*linesw[tp->t_line].l_open)(dev, tp); 835 if ((tp->t_state & TS_ISOPEN) && CALLOUT(dev)) 836 rc->rc_flags |= RC_ACTOUT; --- 53 unchanged lines hidden (view full) --- 890 (void) rc_modctl(rc, TIOCM_RTS, DMSET); 891 if (rc->rc_dtrwait) { 892 timeout(rc_dtrwakeup, rc, rc->rc_dtrwait); 893 rc->rc_flags |= RC_DTR_OFF; 894 } 895 } 896 rc->rc_flags &= ~RC_ACTOUT; 897 wakeup((caddr_t) &rc->rc_rcb); /* wake bi */ | 829 rc->rc_dcdwaits--; 830 if (error != 0) 831 goto out; 832 goto again; 833 } 834 error = (*linesw[tp->t_line].l_open)(dev, tp); 835 if ((tp->t_state & TS_ISOPEN) && CALLOUT(dev)) 836 rc->rc_flags |= RC_ACTOUT; --- 53 unchanged lines hidden (view full) --- 890 (void) rc_modctl(rc, TIOCM_RTS, DMSET); 891 if (rc->rc_dtrwait) { 892 timeout(rc_dtrwakeup, rc, rc->rc_dtrwait); 893 rc->rc_flags |= RC_DTR_OFF; 894 } 895 } 896 rc->rc_flags &= ~RC_ACTOUT; 897 wakeup((caddr_t) &rc->rc_rcb); /* wake bi */ |
898 wakeup((caddr_t) &tp->t_rawq); /* wake dcd */ | 898 wakeup(TSA_CARR_ON(tp)); |
899 (void) splx(s); 900} 901 902/* Read from line */ 903int rcread(dev, uio, flag) 904 dev_t dev; 905 struct uio *uio; 906 int flag; --- 622 unchanged lines hidden --- | 899 (void) splx(s); 900} 901 902/* Read from line */ 903int rcread(dev, uio, flag) 904 dev_t dev; 905 struct uio *uio; 906 int flag; --- 622 unchanged lines hidden --- |