From 270ba6ed9ba03f213d46660e528911fb595088ca Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 7 Sep 1995 17:12:29 +0000 Subject: (trivfs_S_io_write): Start pending output before blocking. --- term/users.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'term') diff --git a/term/users.c b/term/users.c index 4eb61be8..b61a98e0 100644 --- a/term/users.c +++ b/term/users.c @@ -70,6 +70,17 @@ struct protid_hook pid_t pid, pgrp; }; +void +init_users () +{ + cttyid = ports_allocate_port (term_bucket, sizeof (struct port_info), + cttyid_class); + mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, + &async_icky_id); + mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &async_id); +} + + static error_t open_hook (struct trivfs_control *cntl, uid_t *uids, u_int nuids, @@ -94,6 +105,8 @@ open_hook (struct trivfs_control *cntl, termstate.c_cflag |= CREAD | CS8 | HUPCL; bcopy (ttydefchars, termstate.c_cc, NCCS); + + termflags |= NO_OWNER; } else if (termflags & EXCL_USE) { @@ -380,11 +393,14 @@ trivfs_S_io_write (struct trivfs_protid *cred, for (i = 0; i < datalen; i++) { while (!qavail (outputq) && !cancel) - cancel = hurd_condition_wait (outputq->wait, &global_lock); + { + start_output (); + cancel = hurd_condition_wait (outputq->wait, &global_lock); + } if (cancel) break; - output_character (data[i]); + write_character (data[i]); } *amt = i; -- cgit v1.2.3