home *** CD-ROM | disk | FTP | other *** search
- /*
- * Mach Operating System
- * Copyright (c) 1987 Carnegie-Mellon University
- * All rights reserved. The CMU software License Agreement specifies
- * the terms and conditions for use and redistribution.
- */
- /*
- *
- * HISTORY
- * 13-Feb-88 John Seamons (jks) at NeXT
- * NeXT: added d_getc and d_putc entries in cdevsw for console support.
- *
- * 18-Nov-87 Avadis Tevanian (avie) at Carnegie-Mellon University
- * Removed conditionals, history.
- */
-
- /*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- *
- * @(#)conf.h 7.1 (Berkeley) 6/4/86
- */
-
- #ifndef _SYS_CONF_H_
- #define _SYS_CONF_H_ 1
- extern int nulldev();
- extern int nodev();
-
- /*
- * Declaration of block device
- * switch. Each entry (row) is
- * the only link between the
- * main unix code and the driver.
- * The initialization of the
- * device switches is in the
- * file conf.c.
- */
- struct bdevsw
- {
- int (*d_open)();
- int (*d_close)();
- int (*d_strategy)();
- int (*d_dump)();
- int (*d_psize)();
- int d_flags;
- };
- #ifdef KERNEL
- extern struct bdevsw bdevsw[];
- extern int nblkdev;
-
- /*
- * Contents of empty bdevsw slot.
- */
- #define NO_BDEVICE \
- { nodev, nodev, nodev, nodev, \
- 0, 0 }
-
- #endif
-
- /*
- * Character device switch.
- */
- struct cdevsw
- {
- int (*d_open)();
- int (*d_close)();
- int (*d_read)();
- int (*d_write)();
- int (*d_ioctl)();
- int (*d_stop)();
- int (*d_reset)();
- int (*d_select)();
- int (*d_mmap)();
- #if NeXT
- int (*d_getc)();
- int (*d_putc)();
- #endif NeXT
- };
- #ifdef KERNEL
- extern struct cdevsw cdevsw[];
- extern int nchrdev;
-
- /*
- * Contents of empty cdevsw slot.
- */
- #define NO_CDEVICE \
- { \
- nodev, nodev, nodev, nodev, \
- nodev, nodev, nodev, seltrue, \
- nodev, nodev, nodev, \
- }
-
- #endif
-
- /*
- * tty line control switch.
- */
- struct linesw
- {
- int (*l_open)();
- int (*l_close)();
- int (*l_read)();
- int (*l_write)();
- int (*l_ioctl)();
- int (*l_rint)();
- int (*l_rend)();
- int (*l_meta)();
- int (*l_start)();
- int (*l_modem)();
- #if romp || NeXT
- int (*l_select)();
- #endif romp || NeXT
- #if NeXT
- int l_kind; /* if 0, follows normal clist usage */
- #endif NeXT
- };
- #ifdef KERNEL
- extern struct linesw linesw[];
- #endif
- #endif _SYS_CONF_H_
-