diff options
author | Miles Bader <miles@gnu.org> | 1996-01-27 17:21:13 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-27 17:21:13 +0000 |
commit | b551d2683632d79183e39685d309d143dfcaa4a0 (patch) | |
tree | 5fbb4e8d48924570a461eb53875c1f0d157f390e | |
parent | 09a3452b870e392feb54614efa131d16b4633c01 (diff) |
(ports_manage_port_operations_multithread):
Pass INP->msgh_id to ports_begin_rpc, and only call DEMUXER if it returns 0.
-rw-r--r-- | libports/manage-multithread.c | 23 |
1 files changed, 15 insertions, 8 deletions
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); |