diff options
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/line.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 6d81ecc17be..4c5e92c04cc 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include "linux/workqueue.h" | 10 | #include "linux/workqueue.h" |
11 | #include "linux/tty.h" | 11 | #include "linux/tty.h" |
12 | #include "linux/interrupt.h" | 12 | #include "linux/interrupt.h" |
13 | #include "asm/semaphore.h" | 13 | #include "linux/spinlock.h" |
14 | #include "chan_user.h" | 14 | #include "chan_user.h" |
15 | #include "mconsole_kern.h" | 15 | #include "mconsole_kern.h" |
16 | 16 | ||
@@ -37,10 +37,18 @@ struct line { | |||
37 | struct list_head chan_list; | 37 | struct list_head chan_list; |
38 | int valid; | 38 | int valid; |
39 | int count; | 39 | int count; |
40 | struct semaphore sem; | 40 | /*This lock is actually, mostly, local to*/ |
41 | spinlock_t lock; | ||
42 | |||
43 | /* Yes, this is a real circular buffer. | ||
44 | * XXX: And this should become a struct kfifo! | ||
45 | * | ||
46 | * buffer points to a buffer allocated on demand, of length | ||
47 | * LINE_BUFSIZE, head to the start of the ring, tail to the end.*/ | ||
41 | char *buffer; | 48 | char *buffer; |
42 | char *head; | 49 | char *head; |
43 | char *tail; | 50 | char *tail; |
51 | |||
44 | int sigio; | 52 | int sigio; |
45 | struct work_struct task; | 53 | struct work_struct task; |
46 | struct line_driver *driver; | 54 | struct line_driver *driver; |
@@ -52,7 +60,6 @@ struct line { | |||
52 | init_pri : INIT_STATIC, \ | 60 | init_pri : INIT_STATIC, \ |
53 | chan_list : { }, \ | 61 | chan_list : { }, \ |
54 | valid : 1, \ | 62 | valid : 1, \ |
55 | sem : { }, \ | ||
56 | buffer : NULL, \ | 63 | buffer : NULL, \ |
57 | head : NULL, \ | 64 | head : NULL, \ |
58 | tail : NULL, \ | 65 | tail : NULL, \ |
@@ -69,15 +76,18 @@ struct lines { | |||
69 | extern void line_close(struct tty_struct *tty, struct file * filp); | 76 | extern void line_close(struct tty_struct *tty, struct file * filp); |
70 | extern int line_open(struct line *lines, struct tty_struct *tty, | 77 | extern int line_open(struct line *lines, struct tty_struct *tty, |
71 | struct chan_opts *opts); | 78 | struct chan_opts *opts); |
72 | extern int line_setup(struct line *lines, int num, char *init, | 79 | extern int line_setup(struct line *lines, unsigned int sizeof_lines, char *init, |
73 | int all_allowed); | 80 | int all_allowed); |
74 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, int len); | 81 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, int len); |
75 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); | 82 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); |
76 | extern void line_set_termios(struct tty_struct *tty, struct termios * old); | 83 | extern void line_set_termios(struct tty_struct *tty, struct termios * old); |
77 | extern int line_chars_in_buffer(struct tty_struct *tty); | 84 | extern int line_chars_in_buffer(struct tty_struct *tty); |
85 | extern void line_flush_buffer(struct tty_struct *tty); | ||
86 | extern void line_flush_chars(struct tty_struct *tty); | ||
78 | extern int line_write_room(struct tty_struct *tty); | 87 | extern int line_write_room(struct tty_struct *tty); |
79 | extern int line_ioctl(struct tty_struct *tty, struct file * file, | 88 | extern int line_ioctl(struct tty_struct *tty, struct file * file, |
80 | unsigned int cmd, unsigned long arg); | 89 | unsigned int cmd, unsigned long arg); |
90 | |||
81 | extern char *add_xterm_umid(char *base); | 91 | extern char *add_xterm_umid(char *base); |
82 | extern int line_setup_irq(int fd, int input, int output, struct tty_struct *tty); | 92 | extern int line_setup_irq(int fd, int input, int output, struct tty_struct *tty); |
83 | extern void line_close_chan(struct line *line); | 93 | extern void line_close_chan(struct line *line); |
@@ -89,20 +99,10 @@ extern struct tty_driver * line_register_devfs(struct lines *set, | |||
89 | int nlines); | 99 | int nlines); |
90 | extern void lines_init(struct line *lines, int nlines); | 100 | extern void lines_init(struct line *lines, int nlines); |
91 | extern void close_lines(struct line *lines, int nlines); | 101 | extern void close_lines(struct line *lines, int nlines); |
92 | extern int line_config(struct line *lines, int num, char *str); | 102 | |
93 | extern int line_remove(struct line *lines, int num, char *str); | 103 | extern int line_config(struct line *lines, unsigned int sizeof_lines, char *str); |
94 | extern int line_get_config(char *dev, struct line *lines, int num, char *str, | 104 | extern int line_remove(struct line *lines, unsigned int sizeof_lines, char *str); |
105 | extern int line_get_config(char *dev, struct line *lines, unsigned int sizeof_lines, char *str, | ||
95 | int size, char **error_out); | 106 | int size, char **error_out); |
96 | 107 | ||
97 | #endif | 108 | #endif |
98 | |||
99 | /* | ||
100 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
101 | * Emacs will notice this stuff at the end of the file and automatically | ||
102 | * adjust the settings for this buffer only. This must remain at the end | ||
103 | * of the file. | ||
104 | * --------------------------------------------------------------------------- | ||
105 | * Local variables: | ||
106 | * c-file-style: "linux" | ||
107 | * End: | ||
108 | */ | ||