diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-04 03:21:18 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-04 03:21:18 +0000 |
commit | 9fd51e9b0ad33a89a83fdbbb66bd20d85f7893fb (patch) | |
tree | 8845b79f170028cb4380045c50277bbf075b5b7d /pfinet/linux-src/include/linux/devpts_fs.h | |
download | hurd-9fd51e9b0ad33a89a83fdbbb66bd20d85f7893fb.tar.gz hurd-9fd51e9b0ad33a89a83fdbbb66bd20d85f7893fb.tar.bz2 hurd-9fd51e9b0ad33a89a83fdbbb66bd20d85f7893fb.zip |
Import of Linux 2.2.12 subset (ipv4 stack and related)
Diffstat (limited to 'pfinet/linux-src/include/linux/devpts_fs.h')
-rw-r--r-- | pfinet/linux-src/include/linux/devpts_fs.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/pfinet/linux-src/include/linux/devpts_fs.h b/pfinet/linux-src/include/linux/devpts_fs.h new file mode 100644 index 00000000..d9dfbb44 --- /dev/null +++ b/pfinet/linux-src/include/linux/devpts_fs.h @@ -0,0 +1,74 @@ +/* -*- linux-c -*- --------------------------------------------------------- * + * + * linux/include/linux/devpts_fs.h + * + * Copyright 1998 H. Peter Anvin -- All Rights Reserved + * + * This file is part of the Linux kernel and is made available under + * the terms of the GNU General Public License, version 2, or at your + * option, any later version, incorporated herein by reference. + * + * ------------------------------------------------------------------------- */ + +/* + * Prototypes for the pty driver <-> devpts filesystem interface. Most + * of this is really just a hack so we can exclude it or build it as a + * module, and probably should go away eventually. + */ + +#ifndef _LINUX_DEVPTS_FS_H +#define _LINUX_DEVPTS_FS_H 1 + +#include <linux/config.h> +#include <linux/kdev_t.h> +#include <linux/tty.h> + +#ifdef CONFIG_DEVPTS_FS + +void devpts_pty_new(int, kdev_t); +void devpts_pty_kill(int); +#define unix98_max_ptys NR_PTYS * UNIX98_NR_MAJORS; + +#elif defined(CONFIG_DEVPTS_FS_MODULE) + +#ifdef BUILDING_PTY_C +void (*devpts_upcall_new)(int,kdev_t) = NULL; +void (*devpts_upcall_kill)(int) = NULL; +unsigned int unix98_max_ptys = NR_PTYS * UNIX98_NR_MAJORS; + +EXPORT_SYMBOL(devpts_upcall_new); +EXPORT_SYMBOL(devpts_upcall_kill); +EXPORT_SYMBOL(unix98_max_ptys); +#else +extern void (*devpts_upcall_new)(int,kdev_t); +extern void (*devpts_upcall_kill)(int); +extern unsigned int unix98_max_ptys; +#endif + +#ifndef BUILDING_DEVPTS +extern inline void +devpts_pty_new(int line, kdev_t device) +{ + if ( devpts_upcall_new ) + return devpts_upcall_new(line,device); +} + +extern inline void +devpts_pty_kill(int line) +{ + if ( devpts_upcall_kill ) + return devpts_upcall_kill(line); +} +#endif + +#else /* No /dev/pts filesystem at all */ + +extern inline void +devpts_pty_new(int line, kdev_t device) { } + +extern inline void +devpts_pty_kill(int line) { } + +#endif + +#endif /* _LINUX_DEVPTS_FS_H */ |