static inline void pty_copy(struct tty_struct * from, struct tty_struct * to) { int c; while (!from->stopped && !EMPTY(&from->write_q)) { if (FULL(&to->read_q)) { if (FULL(&to->secondary)) break; TTY_READ_FLUSH(to); continue; } c = get_tty_queue(&from->write_q); put_tty_queue(c, &to->read_q); if (current->signal & ~current->blocked) break; } TTY_READ_FLUSH(to); wake_up(&from->write_q.proc_list); }
static inline void pty_copy(struct tty_struct * from, struct tty_struct * to) { int c; while (!from->stopped && !EMPTY(&from->write_q)) { if (FULL(&to->read_q)) { if (FULL(&to->secondary)) break; TTY_READ_FLUSH(to); continue; } c = get_tty_queue(&from->write_q); put_tty_queue(c, &to->read_q); if (current->signal & ~current->blocked) break; } TTY_READ_FLUSH(to); wake_up_interruptible(&from->write_q.proc_list); if (from->write_data_cnt) { set_bit(from->line, &tty_check_write); mark_bh(TTY_BH); } }