From b551d2683632d79183e39685d309d143dfcaa4a0 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 27 Jan 1996 17:21:13 +0000 Subject: (ports_manage_port_operations_multithread): Pass INP->msgh_id to ports_begin_rpc, and only call DEMUXER if it returns 0. --- libports/manage-multithread.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'libports/manage-multithread.c') diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 480113ef..58109399 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -65,13 +65,18 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, pi = ports_lookup_port (bucket, inp->msgh_local_port, 0); if (pi) { - ports_begin_rpc (pi, &link); - mutex_lock (&_ports_lock); - if (inp->msgh_seqno < pi->cancel_threshhold) - hurd_thread_cancel (link.thread); - mutex_unlock (&_ports_lock); - status = demuxer (inp, outp); - ports_end_rpc (pi, &link); + error_t err = ports_begin_rpc (pi, inp->msgh_id, &link); + if (err) + status = 0; + else + { + mutex_lock (&_ports_lock); + if (inp->msgh_seqno < pi->cancel_threshold) + hurd_thread_cancel (link.thread); + mutex_unlock (&_ports_lock); + status = demuxer (inp, outp); + ports_end_rpc (pi, &link); + } ports_port_deref (pi); } else @@ -131,6 +136,8 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, cleanly with cthreads cleverness yet. */ wire_cthreads = 1; + thread_timeout = global_timeout = 0; /* XXX */ + nreqthreads = 1; totalthreads = 1; thread_function (1); -- cgit v1.2.3