summaryrefslogtreecommitdiff
path: root/libports
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-11-21 15:01:05 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-11-21 15:01:05 +0000
commitaf0218b4920aa13c23abd38fcbacfc525b8280a4 (patch)
treef8997b3dc9a973c203e0ccfcccca3266f0e093a6 /libports
parent283e64e8ee9c856607345a9fb67a36a7d37c4ee4 (diff)
(ports_S_interrupt_operation): Set PI->cancel_threshhold if the
incoming seqno is greater than the current threshhold.
Diffstat (limited to 'libports')
-rw-r--r--libports/interrupt-operation.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libports/interrupt-operation.c b/libports/interrupt-operation.c
index 532a3f5e..5867e7c1 100644
--- a/libports/interrupt-operation.c
+++ b/libports/interrupt-operation.c
@@ -23,11 +23,16 @@
/* Cause a pending request on this object to immediately return. The
exact semantics are dependent on the specific object. */
error_t
-ports_S_interrupt_operation (mach_port_t port)
+ports_S_interrupt_operation (mach_port_t port,
+ mach_port_seqno_t seqno)
{
struct port_info *pi = ports_lookup_port (0, port, 0);
if (!pi)
return EOPNOTSUPP;
+ mutex_lock (&_ports_lock);
+ if (pi->cancel_threshhold < seqno)
+ pi->cancel_threshhold = seqno;
+ mutex_unlock (&_ports_lock);
ports_interrupt_rpc (pi);
ports_port_deref (pi);
return 0;