Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139204
b: refs/heads/master
c: 4b19449
h: refs/heads/master
v: v3
  • Loading branch information
Davide Libenzi authored and Linus Torvalds committed Apr 1, 2009
1 parent b78b5a5 commit 99606a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 395108880efff4a4ffa1ffa554477f7f5ba6a031
refs/heads/master: 4b19449db074eec86ae31a96d3cdca4aa7f138ab
20 changes: 10 additions & 10 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ void tty_wakeup(struct tty_struct *tty)
tty_ldisc_deref(ld);
}
}
wake_up_interruptible(&tty->write_wait);
wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
}

EXPORT_SYMBOL_GPL(tty_wakeup);
Expand Down Expand Up @@ -587,8 +587,8 @@ static void do_tty_hangup(struct work_struct *work)
* FIXME: Once we trust the LDISC code better we can wait here for
* ldisc completion and fix the driver call race
*/
wake_up_interruptible(&tty->write_wait);
wake_up_interruptible(&tty->read_wait);
wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
wake_up_interruptible_poll(&tty->read_wait, POLLIN);
/*
* Shutdown the current line discipline, and reset it to
* N_TTY.
Expand Down Expand Up @@ -879,7 +879,7 @@ void stop_tty(struct tty_struct *tty)
if (tty->link && tty->link->packet) {
tty->ctrl_status &= ~TIOCPKT_START;
tty->ctrl_status |= TIOCPKT_STOP;
wake_up_interruptible(&tty->link->read_wait);
wake_up_interruptible_poll(&tty->link->read_wait, POLLIN);
}
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
if (tty->ops->stop)
Expand Down Expand Up @@ -913,7 +913,7 @@ void start_tty(struct tty_struct *tty)
if (tty->link && tty->link->packet) {
tty->ctrl_status &= ~TIOCPKT_STOP;
tty->ctrl_status |= TIOCPKT_START;
wake_up_interruptible(&tty->link->read_wait);
wake_up_interruptible_poll(&tty->link->read_wait, POLLIN);
}
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
if (tty->ops->start)
Expand Down Expand Up @@ -970,7 +970,7 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
void tty_write_unlock(struct tty_struct *tty)
{
mutex_unlock(&tty->atomic_write_lock);
wake_up_interruptible(&tty->write_wait);
wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
}

int tty_write_lock(struct tty_struct *tty, int ndelay)
Expand Down Expand Up @@ -1623,21 +1623,21 @@ void tty_release_dev(struct file *filp)

if (tty_closing) {
if (waitqueue_active(&tty->read_wait)) {
wake_up(&tty->read_wait);
wake_up_poll(&tty->read_wait, POLLIN);
do_sleep++;
}
if (waitqueue_active(&tty->write_wait)) {
wake_up(&tty->write_wait);
wake_up_poll(&tty->write_wait, POLLOUT);
do_sleep++;
}
}
if (o_tty_closing) {
if (waitqueue_active(&o_tty->read_wait)) {
wake_up(&o_tty->read_wait);
wake_up_poll(&o_tty->read_wait, POLLIN);
do_sleep++;
}
if (waitqueue_active(&o_tty->write_wait)) {
wake_up(&o_tty->write_wait);
wake_up_poll(&o_tty->write_wait, POLLOUT);
do_sleep++;
}
}
Expand Down

0 comments on commit 99606a8

Please sign in to comment.