summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/libports_interrupt_lookup.patch97
-rw-r--r--debian/patches/series1
2 files changed, 98 insertions, 0 deletions
diff --git a/debian/patches/libports_interrupt_lookup.patch b/debian/patches/libports_interrupt_lookup.patch
new file mode 100644
index 00000000..1dc291be
--- /dev/null
+++ b/debian/patches/libports_interrupt_lookup.patch
@@ -0,0 +1,97 @@
+diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs
+index 6060fa4..129a68c 100644
+--- a/hurd/hurd_types.defs
++++ b/hurd/hurd_types.defs
+@@ -168,6 +168,18 @@ destructor: EXEC_STARTUP_DESTRUCTOR
+ #endif
+ ;
+
++type interrupt_t = mach_port_copy_send_t
++#ifdef INTERRUPT_INTRAN
++intran: INTERRUPT_INTRAN
++#endif
++#ifdef INTERRUPT_OUTTRAN
++outtran: INTERRUPT_OUTTRAN
++#endif
++#ifdef INTERRUPT_DESTRUCTOR
++destructor: INTERRUPT_DESTRUCTOR
++#endif
++;
++
+
+ type proccoll_t = mach_port_copy_send_t;
+
+diff --git a/hurd/interrupt.defs b/hurd/interrupt.defs
+index cc3ad1e..9981aed 100644
+--- a/hurd/interrupt.defs
++++ b/hurd/interrupt.defs
+@@ -23,10 +23,14 @@ subsystem interrupt 33000;
+
+ #include <hurd/hurd_types.defs>
+
++#ifdef INTERRUPT_IMPORTS
++INTERRUPT_IMPORTS
++#endif
++
+ /* Cause a pending request on this object to immediately return. The
+ exact semantics are dependent on the specific object. */
+
+ routine
+-interrupt_operation (object: mach_port_t;
++interrupt_operation (object: interrupt_t;
+ waittime timeout: natural_t;
+ msgseqno seqno: mach_port_seqno_t);
+diff --git a/libports/interrupt-operation.c b/libports/interrupt-operation.c
+index 19c0edf..943bd4f 100644
+--- a/libports/interrupt-operation.c
++++ b/libports/interrupt-operation.c
+@@ -24,10 +24,9 @@
+ /* Cause a pending request on this object to immediately return. The
+ exact semantics are dependent on the specific object. */
+ kern_return_t
+-ports_S_interrupt_operation (mach_port_t port,
++ports_S_interrupt_operation (struct port_info *pi,
+ mach_port_seqno_t seqno)
+ {
+- struct port_info *pi = ports_lookup_port (0, port, 0);
+ if (!pi)
+ return EOPNOTSUPP;
+ pthread_mutex_lock (&_ports_lock);
+@@ -35,6 +34,5 @@ ports_S_interrupt_operation (mach_port_t port,
+ pi->cancel_threshold = seqno;
+ pthread_mutex_unlock (&_ports_lock);
+ ports_interrupt_rpcs (pi);
+- ports_port_deref (pi);
+ return 0;
+ }
+diff --git a/libports/mig-mutate.h b/libports/mig-mutate.h
+index f692236..4c011b6 100644
+--- a/libports/mig-mutate.h
++++ b/libports/mig-mutate.h
+@@ -23,3 +23,10 @@
+ end_using_port_info (port_info_t)
+ #define NOTIFY_IMPORTS \
+ import "libports/mig-decls.h";
++
++#define INTERRUPT_INTRAN \
++ port_info_t begin_using_port_info_port (mach_port_t)
++#define INTERRUPT_DESTRUCTOR \
++ end_using_port_info (port_info_t)
++#define INTERRUPT_IMPORTS \
++ import "libports/mig-decls.h";
+diff --git a/libports/ports.h b/libports/ports.h
+index 47d4607..7f13124 100644
+--- a/libports/ports.h
++++ b/libports/ports.h
+@@ -398,11 +398,6 @@ extern kern_return_t
+ ports_do_mach_notify_port_destroyed (struct port_info *pi, mach_port_t name);
+ extern kern_return_t
+ ports_do_mach_notify_send_once (struct port_info *pi);
+-
+-/* A default interrupt server */
+-int ports_interrupt_server (mach_msg_header_t *, mach_msg_header_t *);
+-extern kern_return_t ports_S_interrupt_operation (mach_port_t,
+- mach_port_seqno_t);
+
+ /* Private data */
+ extern pthread_mutex_t _ports_lock;
diff --git a/debian/patches/series b/debian/patches/series
index 65769bfb..1be5a976 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -42,3 +42,4 @@ xkb-compat.patch
xxx-fix-build.patch
mach-defpager-protected-payload.patch
#ext2fs-skip-unallocated-blocks.patch
+libports_interrupt_lookup.patch