From 0e06db4c6fa5ffd7c5861bc147a2badd5964aaf4 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Thu, 29 Aug 1996 21:44:27 +0000 Subject: *** empty log message *** --- term/ChangeLog | 7 +++++++ term/devio.c | 5 ++++- term/users.c | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/term/ChangeLog b/term/ChangeLog index 1e4854c6..c6a02d5a 100644 --- a/term/ChangeLog +++ b/term/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 29 17:26:37 1996 Thomas Bushnell, n/BSG + + * devio.c (device_open_reply): After error from ports_create_port, + unlock global_lock before returning. + * users.c (trivfs_S_io_readable): Likewise before returning + EBADF. + Thu Aug 15 16:07:07 1996 Thomas Bushnell, n/BSG * users.c (trivfs_S_io_pathconf): Implement function. diff --git a/term/devio.c b/term/devio.c index e8f7f0b6..cad276de 100644 --- a/term/devio.c +++ b/term/devio.c @@ -468,7 +468,10 @@ device_open_reply (mach_port_t replyport, sizeof (struct port_info), &phys_reply_writes_pi); if (errno) - return errno; + { + mutex_unlock (&global_lock); + return errno; + } phys_reply_writes = ports_get_right (phys_reply_writes_pi); mach_port_insert_right (mach_task_self (), phys_reply_writes, phys_reply_writes, MACH_MSG_TYPE_MAKE_SEND); diff --git a/term/users.c b/term/users.c index cf89fee5..9396dd5f 100644 --- a/term/users.c +++ b/term/users.c @@ -795,7 +795,10 @@ trivfs_S_io_readable (struct trivfs_protid *cred, mutex_lock (&global_lock); if ((cred->po->openmodes & O_READ) == 0) - return EBADF; + { + mutex_unlock (&global_lock); + return EBADF; + } *amt = qsize (inputq); if (remote_input_mode && *amt) --*amt; -- cgit v1.2.3