patch-2.3.1 linux/drivers/char/tty_io.c
Next file: linux/drivers/char/tty_ioctl.c
Previous file: linux/drivers/char/tpqic02.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Tue May 11 14:37:40 1999
- Orig file:
v2.3.0/linux/drivers/char/tty_io.c
- Orig date:
Mon Mar 22 10:06:21 1999
diff -u --recursive --new-file v2.3.0/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -729,7 +729,7 @@
}
/* Semaphore to protect creating and releasing a tty */
-static struct semaphore tty_sem = MUTEX;
+static DECLARE_MUTEX(tty_sem);
static void down_tty_sem(int index)
{
@@ -1930,7 +1930,9 @@
tty->flip.flag_buf_ptr = tty->flip.flag_buf;
tty->flip.tqueue.routine = flush_to_ldisc;
tty->flip.tqueue.data = tty;
- tty->flip.pty_sem = MUTEX;
+ init_MUTEX(&tty->flip.pty_sem);
+ init_waitqueue_head(&tty->write_wait);
+ init_waitqueue_head(&tty->read_wait);
tty->tq_hangup.routine = do_tty_hangup;
tty->tq_hangup.data = tty;
sema_init(&tty->atomic_read, 1);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)