6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / uts / common / sys / tty.h
blob5ec67a9a97ddb30943762ad4a69d801eec83cd36
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * Copyright (c) 1987-1998 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_TTY_H
28 #define _SYS_TTY_H
30 #pragma ident "%Z%%M% %I% %E% SMI" /* SunOS 4.0 2.13 */
32 #include <sys/stream.h>
33 #include <sys/termios.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 typedef struct tty_common {
40 int t_flags;
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 */
50 } tty_common_t;
52 #define TS_XCLUDE 0x00000001 /* tty is open for exclusive use */
53 #define TS_SOFTCAR 0x00000002 /* force carrier on */
55 #ifdef _KERNEL
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 *);
59 #endif /* _KERNEL */
61 #ifdef __cplusplus
63 #endif
65 #endif /* _SYS_TTY_H */