Junk comselect(); it's the same at ttselect().

This commit is contained in:
mycroft 1994-01-13 14:58:12 +00:00
parent 5358c47ee5
commit 33a067f307
4 changed files with 4 additions and 106 deletions

View File

@ -1 +1 @@
revision 1.25 intentionally removed
revision 1.26 intentionally removed

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: com.c,v 1.14 1993/12/20 09:05:33 mycroft Exp $
* $Id: com.c,v 1.15 1994/01/13 14:58:12 mycroft Exp $
*/
#include "com.h"
@ -723,38 +723,4 @@ comcnputc(dev, c)
splx(s);
}
int
comselect(dev, rw, p)
dev_t dev;
int rw;
struct proc *p;
{
register struct tty *tp = com_tty[UNIT(dev)];
int nread;
int s = spltty();
struct proc *selp;
switch (rw) {
case FREAD:
nread = ttnread(tp);
if (nread > 0 ||
((tp->t_cflag&CLOCAL) == 0 && (tp->t_state&TS_CARR_ON) == 0))
goto win;
selrecord(p, &tp->t_rsel);
break;
case FWRITE:
if (tp->t_outq.c_cc <= tp->t_lowat)
goto win;
selrecord(p, &tp->t_wsel);
break;
}
splx(s);
return (0);
win:
splx(s);
return (1);
}
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: com.c,v 1.14 1993/12/20 09:05:33 mycroft Exp $
* $Id: com.c,v 1.15 1994/01/13 14:58:12 mycroft Exp $
*/
#include "com.h"
@ -723,38 +723,4 @@ comcnputc(dev, c)
splx(s);
}
int
comselect(dev, rw, p)
dev_t dev;
int rw;
struct proc *p;
{
register struct tty *tp = com_tty[UNIT(dev)];
int nread;
int s = spltty();
struct proc *selp;
switch (rw) {
case FREAD:
nread = ttnread(tp);
if (nread > 0 ||
((tp->t_cflag&CLOCAL) == 0 && (tp->t_state&TS_CARR_ON) == 0))
goto win;
selrecord(p, &tp->t_rsel);
break;
case FWRITE:
if (tp->t_outq.c_cc <= tp->t_lowat)
goto win;
selrecord(p, &tp->t_wsel);
break;
}
splx(s);
return (0);
win:
splx(s);
return (1);
}
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: com.c,v 1.14 1993/12/20 09:05:33 mycroft Exp $
* $Id: com.c,v 1.15 1994/01/13 14:58:12 mycroft Exp $
*/
#include "com.h"
@ -723,38 +723,4 @@ comcnputc(dev, c)
splx(s);
}
int
comselect(dev, rw, p)
dev_t dev;
int rw;
struct proc *p;
{
register struct tty *tp = com_tty[UNIT(dev)];
int nread;
int s = spltty();
struct proc *selp;
switch (rw) {
case FREAD:
nread = ttnread(tp);
if (nread > 0 ||
((tp->t_cflag&CLOCAL) == 0 && (tp->t_state&TS_CARR_ON) == 0))
goto win;
selrecord(p, &tp->t_rsel);
break;
case FWRITE:
if (tp->t_outq.c_cc <= tp->t_lowat)
goto win;
selrecord(p, &tp->t_wsel);
break;
}
splx(s);
return (0);
win:
splx(s);
return (1);
}
#endif