patch-2.2.15 linux/drivers/char/n_hdlc.c
Next file: linux/drivers/char/n_tty.c
Previous file: linux/drivers/char/mxser.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Fri Apr 21 12:46:04 2000
- Orig file:
v2.2.14/drivers/char/n_hdlc.c
- Orig date:
Wed Oct 20 01:12:35 1999
diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/drivers/char/n_hdlc.c linux/drivers/char/n_hdlc.c
@@ -239,6 +239,7 @@
/* Queues for select() functionality */
wait_queue_head_t read_wait;
wait_queue_head_t write_wait;
+ wait_queue_head_t poll_wait;
int tbusy; /* reentrancy flag for tx wakeup code */
int woke_up;
@@ -317,6 +318,7 @@
/* Ensure that the n_hdlcd process is not hanging on select()/poll() */
wake_up_interruptible (&n_hdlc->read_wait);
+ wake_up_interruptible (&n_hdlc->poll_wait);
wake_up_interruptible (&n_hdlc->write_wait);
if (tty != NULL && tty->disc_data == n_hdlc)
@@ -659,6 +661,7 @@
/* wake up any blocked reads and perform async signalling */
wake_up_interruptible (&n_hdlc->read_wait);
+ wake_up_interruptible (&n_hdlc->poll_wait);
if (n_hdlc->tty->fasync != NULL)
kill_fasync (n_hdlc->tty->fasync, SIGIO);
@@ -988,13 +991,7 @@
if (n_hdlc && n_hdlc->magic == HDLC_MAGIC && tty == n_hdlc->tty) {
/* queue current process into any wait queue that */
/* may awaken in the future (read and write) */
-#if LINUX_VERSION_CODE < VERSION(2,1,89)
- poll_wait(&n_hdlc->read_wait, wait);
- poll_wait(&n_hdlc->write_wait, wait);
-#else
- poll_wait(filp, &n_hdlc->read_wait, wait);
- poll_wait(filp, &n_hdlc->write_wait, wait);
-#endif
+ poll_wait(filp, &n_hdlc->poll_wait, wait);
/* set bits for operations that wont block */
if(n_hdlc->rx_buf_list.head)
mask |= POLLIN | POLLRDNORM; /* readable */
@@ -1057,6 +1054,7 @@
n_hdlc->flags = 0;
init_waitqueue_head(&n_hdlc->read_wait);
+ init_waitqueue_head(&n_hdlc->poll_wait);
init_waitqueue_head(&n_hdlc->write_wait);
return n_hdlc;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)