diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-11-21 14:56:00 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-11-21 14:56:00 +0000 |
commit | 591a435f0c8a4dd4b8ddfe019ba8e5af3cacc93e (patch) | |
tree | 5cd855421ef3dd5a8678ff1ace1012952fcfc20c | |
parent | 1db9f21772c810f0d118fc39986a87f8a98659bd (diff) |
(ports_manage_port_operations_multithread/internal_demuxer): If the
incoming RPC has already been cancelled, then call cancel_rpc instead
of the user's demuxer.
(cancel_rpc): New function.
-rw-r--r-- | libports/manage-multithread.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 87a9d278..26afa79a 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -23,6 +23,16 @@ #include <assert.h> #include <cthreads.h> +/* Fill in a cancellation error for the incoming RPC in inp + so that it will be retried. For now, just return junk. XXX */ +static void +cancel_rpc (mach_msg_header_t *inp, + mach_msg_header_t *outp) +{ +} + + + void ports_manage_port_operations_multithread (struct port_bucket *bucket, ports_demuxer_type demuxer, @@ -66,7 +76,13 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, if (pi) { ports_begin_rpc (pi, &link); - status = demuxer (inp, outp); + if (inp->msgh_seqno < pi->cancel_threshhold) + { + cancel_rpc (inp, outp); + status = 1; + } + else + status = demuxer (inp, outp); ports_end_rpc (pi, &link); ports_port_deref (pi); } |