1 /* -*- linux-c -*- --------------------------------------------------------- *
2 *
3 * linux/include/linux/devpts_fs.h
4 *
5 * Copyright 1998 H. Peter Anvin -- All Rights Reserved
6 *
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.
10 *
11 * ------------------------------------------------------------------------- */
12
13 /*
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.
17 */
18
19 #ifndef _LINUX_DEVPTS_FS_H
20 #define _LINUX_DEVPTS_FS_H 1
21
22 #include <linux/config.h>
23 #include <linux/kdev_t.h>
24 #include <linux/tty.h>
25
26 #ifdef CONFIG_DEVPTS_FS
27
28 void devpts_pty_new(int, kdev_t);
29 void devpts_pty_kill(int);
30 #define unix98_max_ptys NR_PTYS * UNIX98_NR_MAJORS;
31
32 #elif defined(CONFIG_DEVPTS_FS_MODULE)
33
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;
38
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
47
48 #ifndef BUILDING_DEVPTS
49 static inline void
50 devpts_pty_new(int line, kdev_t device)
51 {
52 if ( devpts_upcall_new )
53 return devpts_upcall_new(line,device);
54 }
55
56 static inline void
57 devpts_pty_kill(int line)
58 {
59 if ( devpts_upcall_kill )
60 return devpts_upcall_kill(line);
61 }
62 #endif
63
64 #else /* No /dev/pts filesystem at all */
65
66 static inline void
67 devpts_pty_new(int line, kdev_t device) { }
68
69 static inline void
70 devpts_pty_kill(int line) { }
71
72 #endif
73
74 #endif /* _LINUX_DEVPTS_FS_H */
75
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.