tty.c (104393) | tty.c (109623) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 30 unchanged lines hidden (view full) --- 39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 42 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 43 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 44 * SUCH DAMAGE. 45 * 46 * @(#)tty.c 8.8 (Berkeley) 1/21/94 | 1/*- 2 * Copyright (c) 1982, 1986, 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 30 unchanged lines hidden (view full) --- 39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 40 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 41 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 42 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 43 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 44 * SUCH DAMAGE. 45 * 46 * @(#)tty.c 8.8 (Berkeley) 1/21/94 |
47 * $FreeBSD: head/sys/kern/tty.c 104393 2002-10-03 02:13:00Z truckman $ | 47 * $FreeBSD: head/sys/kern/tty.c 109623 2003-01-21 08:56:16Z alfred $ |
48 */ 49 50/*- 51 * TODO: 52 * o Fix races for sending the start char in ttyflush(). 53 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect(). 54 * With luck, there will be MIN chars before select() returns(). 55 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it. --- 2533 unchanged lines hidden (view full) --- 2589 * ttyopen(). 2590 */ 2591struct tty * 2592ttymalloc(struct tty *tp) 2593{ 2594 2595 if (tp) 2596 return(tp); | 48 */ 49 50/*- 51 * TODO: 52 * o Fix races for sending the start char in ttyflush(). 53 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect(). 54 * With luck, there will be MIN chars before select() returns(). 55 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it. --- 2533 unchanged lines hidden (view full) --- 2589 * ttyopen(). 2590 */ 2591struct tty * 2592ttymalloc(struct tty *tp) 2593{ 2594 2595 if (tp) 2596 return(tp); |
2597 tp = malloc(sizeof *tp, M_TTYS, M_WAITOK | M_ZERO); | 2597 tp = malloc(sizeof *tp, M_TTYS, M_ZERO); |
2598 ttyregister(tp); 2599 return (tp); 2600} 2601 2602#if 0 /* XXX not yet usable: session leader holds a ref (see kern_exit.c). */ 2603/* 2604 * Free a tty struct. Clists in the struct should have been freed by 2605 * ttyclose(). --- 94 unchanged lines hidden --- | 2598 ttyregister(tp); 2599 return (tp); 2600} 2601 2602#if 0 /* XXX not yet usable: session leader holds a ref (see kern_exit.c). */ 2603/* 2604 * Free a tty struct. Clists in the struct should have been freed by 2605 * ttyclose(). --- 94 unchanged lines hidden --- |