4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1987-1998 by Sun Microsystems, Inc.
24 * All rights reserved.
30 #pragma ident "%Z%%M% %I% %E% SMI" /* SunOS 4.0 2.13 */
32 #include <sys/stream.h>
33 #include <sys/termios.h>
39 typedef struct tty_common
{
41 queue_t
*t_readq
; /* stream's read queue */
42 queue_t
*t_writeq
; /* stream's write queue */
43 tcflag_t t_iflag
; /* copy of iflag from tty modes */
44 tcflag_t t_cflag
; /* copy of cflag from tty modes */
45 uchar_t t_stopc
; /* copy of c_cc[VSTOP] from tty modes */
46 uchar_t t_startc
; /* copy of c_cc[VSTART] from tty modes */
47 struct winsize t_size
; /* screen/page size */
48 mblk_t
*t_iocpending
; /* ioctl reply pending successful allocation */
49 kmutex_t t_excl
; /* keeps struct consistent */
52 #define TS_XCLUDE 0x00000001 /* tty is open for exclusive use */
53 #define TS_SOFTCAR 0x00000002 /* force carrier on */
56 extern void ttycommon_close(tty_common_t
*);
57 extern void ttycommon_qfull(tty_common_t
*, queue_t
*);
58 extern size_t ttycommon_ioctl(tty_common_t
*, queue_t
*, mblk_t
*, int *);
65 #endif /* _SYS_TTY_H */