Path: blob/master/arch/um/include/shared/chan_kern.h
10818 views
/*1* Copyright (C) 2000, 2001 Jeff Dike ([email protected])2* Licensed under the GPL3*/45#ifndef __CHAN_KERN_H__6#define __CHAN_KERN_H__78#include "linux/tty.h"9#include "linux/list.h"10#include "linux/console.h"11#include "chan_user.h"12#include "line.h"1314struct chan {15struct list_head list;16struct list_head free_list;17struct line *line;18char *dev;19unsigned int primary:1;20unsigned int input:1;21unsigned int output:1;22unsigned int opened:1;23unsigned int enabled:1;24int fd;25const struct chan_ops *ops;26void *data;27};2829extern void chan_interrupt(struct list_head *chans, struct delayed_work *task,30struct tty_struct *tty, int irq);31extern int parse_chan_pair(char *str, struct line *line, int device,32const struct chan_opts *opts, char **error_out);33extern int write_chan(struct list_head *chans, const char *buf, int len,34int write_irq);35extern int console_write_chan(struct list_head *chans, const char *buf,36int len);37extern int console_open_chan(struct line *line, struct console *co);38extern void deactivate_chan(struct list_head *chans, int irq);39extern void reactivate_chan(struct list_head *chans, int irq);40extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);41extern int enable_chan(struct line *line);42extern void close_chan(struct list_head *chans, int delay_free_irq);43extern int chan_window_size(struct list_head *chans,44unsigned short *rows_out,45unsigned short *cols_out);46extern int chan_config_string(struct list_head *chans, char *str, int size,47char **error_out);4849#endif505152