.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "READ_CHAN" "9" "09 October 2005" "" "" .SH NAME read_chan \- read function for tty .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp ssize_t read_chan (struct tty_struct * \fItty\fB, struct file * \fIfile\fB, unsigned char __user * \fIbuf\fB, size_t \fInr\fB); \fR .SH "ARGUMENTS" .TP \fB\fItty\fB\fR tty device .TP \fB\fIfile\fB\fR file object .TP \fB\fIbuf\fB\fR userspace buffer pointer .TP \fB\fInr\fB\fR size of I/O .SH "DESCRIPTION" .PP Perform reads for the line discipline. We are guaranteed that the line discipline will not be closed under us but we may get multiple parallel readers and must handle this ourselves. We may also get a hangup. Always called in user context, may sleep. .PP This code must be sure never to sleep through a hangup.