GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / um / include / shared / line.h
blob5c88bf4f01d3dc2d4e8ff2a8eb6cb7c0d8fb69e6
1 /*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #ifndef __LINE_H__
7 #define __LINE_H__
9 #include "linux/list.h"
10 #include "linux/workqueue.h"
11 #include "linux/tty.h"
12 #include "linux/interrupt.h"
13 #include "linux/spinlock.h"
14 #include "linux/mutex.h"
15 #include "chan_user.h"
16 #include "mconsole_kern.h"
18 /* There's only one modifiable field in this - .mc.list */
19 struct line_driver {
20 const char *name;
21 const char *device_name;
22 const short major;
23 const short minor_start;
24 const short type;
25 const short subtype;
26 const int read_irq;
27 const char *read_irq_name;
28 const int write_irq;
29 const char *write_irq_name;
30 struct mc_device mc;
33 struct line {
34 struct tty_struct *tty;
35 spinlock_t count_lock;
36 int valid;
38 char *init_str;
39 int init_pri;
40 struct list_head chan_list;
42 /*This lock is actually, mostly, local to*/
43 spinlock_t lock;
44 int throttled;
45 char *buffer;
46 char *head;
47 char *tail;
49 int sigio;
50 struct delayed_work task;
51 const struct line_driver *driver;
52 int have_irq;
55 #define LINE_INIT(str, d) \
56 { .count_lock = __SPIN_LOCK_UNLOCKED((str).count_lock), \
57 .init_str = str, \
58 .init_pri = INIT_STATIC, \
59 .valid = 1, \
60 .lock = __SPIN_LOCK_UNLOCKED((str).lock), \
61 .driver = d }
63 extern void line_close(struct tty_struct *tty, struct file * filp);
64 extern int line_open(struct line *lines, struct tty_struct *tty);
65 extern int line_setup(struct line *lines, unsigned int sizeof_lines,
66 char *init, char **error_out);
67 extern int line_write(struct tty_struct *tty, const unsigned char *buf,
68 int len);
69 extern int line_put_char(struct tty_struct *tty, unsigned char ch);
70 extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
71 extern int line_chars_in_buffer(struct tty_struct *tty);
72 extern void line_flush_buffer(struct tty_struct *tty);
73 extern void line_flush_chars(struct tty_struct *tty);
74 extern int line_write_room(struct tty_struct *tty);
75 extern int line_ioctl(struct tty_struct *tty, struct file * file,
76 unsigned int cmd, unsigned long arg);
77 extern void line_throttle(struct tty_struct *tty);
78 extern void line_unthrottle(struct tty_struct *tty);
80 extern char *add_xterm_umid(char *base);
81 extern int line_setup_irq(int fd, int input, int output, struct line *line,
82 void *data);
83 extern void line_close_chan(struct line *line);
84 extern struct tty_driver *register_lines(struct line_driver *line_driver,
85 const struct tty_operations *driver,
86 struct line *lines, int nlines);
87 extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts);
88 extern void close_lines(struct line *lines, int nlines);
90 extern int line_config(struct line *lines, unsigned int sizeof_lines,
91 char *str, const struct chan_opts *opts,
92 char **error_out);
93 extern int line_id(char **str, int *start_out, int *end_out);
94 extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n,
95 char **error_out);
96 extern int line_get_config(char *dev, struct line *lines,
97 unsigned int sizeof_lines, char *str,
98 int size, char **error_out);
100 #endif