More Makefile cleanups, otherwise mainly noticeable are the netfilter fix
[davej-history.git] / include / linux / devpts_fs.h
blob38164e6b2bbf794b1206a20295ed185630eac36d
1 /* -*- linux-c -*- --------------------------------------------------------- *
3 * linux/include/linux/devpts_fs.h
5 * Copyright 1998 H. Peter Anvin -- All Rights Reserved
7 * This file is part of the Linux kernel and is made available under
8 * the terms of the GNU General Public License, version 2, or at your
9 * option, any later version, incorporated herein by reference.
11 * ------------------------------------------------------------------------- */
14 * Prototypes for the pty driver <-> devpts filesystem interface. Most
15 * of this is really just a hack so we can exclude it or build it as a
16 * module, and probably should go away eventually.
19 #ifndef _LINUX_DEVPTS_FS_H
20 #define _LINUX_DEVPTS_FS_H 1
22 #include <linux/config.h>
23 #include <linux/kdev_t.h>
24 #include <linux/tty.h>
26 #ifdef CONFIG_DEVPTS_FS
28 void devpts_pty_new(int, kdev_t);
29 void devpts_pty_kill(int);
30 #define unix98_max_ptys NR_PTYS * UNIX98_NR_MAJORS;
32 #elif defined(CONFIG_DEVPTS_FS_MODULE)
34 #ifdef BUILDING_PTY_C
35 void (*devpts_upcall_new)(int,kdev_t) = NULL;
36 void (*devpts_upcall_kill)(int) = NULL;
37 unsigned int unix98_max_ptys = NR_PTYS * UNIX98_NR_MAJORS;
39 EXPORT_SYMBOL(devpts_upcall_new);
40 EXPORT_SYMBOL(devpts_upcall_kill);
41 EXPORT_SYMBOL(unix98_max_ptys);
42 #else
43 extern void (*devpts_upcall_new)(int,kdev_t);
44 extern void (*devpts_upcall_kill)(int);
45 extern unsigned int unix98_max_ptys;
46 #endif
48 #ifndef BUILDING_DEVPTS
49 static inline void
50 devpts_pty_new(int line, kdev_t device)
52 if ( devpts_upcall_new )
53 return devpts_upcall_new(line,device);
56 static inline void
57 devpts_pty_kill(int line)
59 if ( devpts_upcall_kill )
60 return devpts_upcall_kill(line);
62 #endif
64 #else /* No /dev/pts filesystem at all */
66 static inline void
67 devpts_pty_new(int line, kdev_t device) { }
69 static inline void
70 devpts_pty_kill(int line) { }
72 #endif
74 #endif /* _LINUX_DEVPTS_FS_H */