pty.c (83366) | pty.c (83803) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 |
34 * $FreeBSD: head/sys/kern/tty_pty.c 83366 2001-09-12 08:38:13Z julian $ | 34 * $FreeBSD: head/sys/kern/tty_pty.c 83803 2001-09-21 22:22:25Z jhb $ |
35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "opt_compat.h" 42#include <sys/param.h> --- 465 unchanged lines hidden (view full) --- 508 revents |= events & (POLLOUT | POLLWRNORM); 509 510 if (events & POLLHUP) 511 if ((tp->t_state & TS_CARR_ON) == 0) 512 revents |= POLLHUP; 513 514 if (revents == 0) { 515 if (events & (POLLIN | POLLRDNORM)) | 35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "opt_compat.h" 42#include <sys/param.h> --- 465 unchanged lines hidden (view full) --- 508 revents |= events & (POLLOUT | POLLWRNORM); 509 510 if (events & POLLHUP) 511 if ((tp->t_state & TS_CARR_ON) == 0) 512 revents |= POLLHUP; 513 514 if (revents == 0) { 515 if (events & (POLLIN | POLLRDNORM)) |
516 selrecord(curthread, &pti->pt_selr); | 516 selrecord(td, &pti->pt_selr); |
517 518 if (events & (POLLOUT | POLLWRNORM)) | 517 518 if (events & (POLLOUT | POLLWRNORM)) |
519 selrecord(curthread, &pti->pt_selw); | 519 selrecord(td, &pti->pt_selw); |
520 } 521 splx(s); 522 523 return (revents); 524} 525 526static int 527ptcwrite(dev, uio, flag) --- 331 unchanged lines hidden --- | 520 } 521 splx(s); 522 523 return (revents); 524} 525 526static int 527ptcwrite(dev, uio, flag) --- 331 unchanged lines hidden --- |