Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95179
b: refs/heads/master
c: 0ee9cbb
h: refs/heads/master
i:
  95177: 379ddaf
  95175: e71f17e
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Apr 30, 2008
1 parent ad54032 commit 911f0a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 5d0fdf1e01899805b6c2c0b789a707dcb731b1ea
refs/heads/master: 0ee9cbb3c705903db9c258047d9ce87096e6a1a1
11 changes: 7 additions & 4 deletions trunk/drivers/char/tty_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>

#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -61,11 +62,13 @@ void tty_wait_until_sent(struct tty_struct *tty, long timeout)
return;
if (!timeout)
timeout = MAX_SCHEDULE_TIMEOUT;
lock_kernel();
if (wait_event_interruptible_timeout(tty->write_wait,
!tty->driver->chars_in_buffer(tty), timeout) < 0)
return;
if (tty->driver->wait_until_sent)
tty->driver->wait_until_sent(tty, timeout);
!tty->driver->chars_in_buffer(tty), timeout) >= 0) {
if (tty->driver->wait_until_sent)
tty->driver->wait_until_sent(tty, timeout);
}
unlock_kernel();
}
EXPORT_SYMBOL(tty_wait_until_sent);

Expand Down

0 comments on commit 911f0a9

Please sign in to comment.