summaryrefslogtreecommitdiff
path: root/debian/patches/0001-libpager-remove-the-seqno-parameters.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0001-libpager-remove-the-seqno-parameters.patch')
-rw-r--r--debian/patches/0001-libpager-remove-the-seqno-parameters.patch330
1 files changed, 330 insertions, 0 deletions
diff --git a/debian/patches/0001-libpager-remove-the-seqno-parameters.patch b/debian/patches/0001-libpager-remove-the-seqno-parameters.patch
new file mode 100644
index 00000000..268db7f7
--- /dev/null
+++ b/debian/patches/0001-libpager-remove-the-seqno-parameters.patch
@@ -0,0 +1,330 @@
+From 26556b05de08cd081c9d80b55746262f6bb59dc8 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Sun, 7 Dec 2014 17:22:31 +0100
+Subject: [PATCH hurd 1/2] libpager: remove the `seqno' parameters
+
+* libpager/Makefile (MIGSFLAGS): Drop `-DSEQNOS'.
+* libpager/priv.h (struct pager): Drop fields `seqno' and `waitingforseqno'.
+* libpager/chg-compl.c: Adopt accordingly.
+* libpager/data-request.c: Likewise.
+* libpager/data-return.c: Likewise.
+* libpager/data-unlock.c: Likewise.
+* libpager/demuxer.c: Likewise.
+* libpager/lock-completed.c: Likewise.
+* libpager/no-senders.c: Likewise.
+* libpager/notify-stubs.c: Likewise.
+* libpager/object-init.c: Likewise.
+* libpager/object-terminate.c: Likewise.
+* libpager/pager-create.c: Likewise.
+* libpager/stubs.c: Likewise.
+---
+ libpager/Makefile | 2 +-
+ libpager/chg-compl.c | 3 +--
+ libpager/data-request.c | 3 +--
+ libpager/data-return.c | 13 ++++++-------
+ libpager/data-unlock.c | 3 +--
+ libpager/demuxer.c | 4 ++--
+ libpager/lock-completed.c | 3 +--
+ libpager/no-senders.c | 3 +--
+ libpager/notify-stubs.c | 15 +++++----------
+ libpager/object-init.c | 3 +--
+ libpager/object-terminate.c | 3 +--
+ libpager/pager-create.c | 2 --
+ libpager/priv.h | 3 ---
+ libpager/stubs.c | 9 +++------
+ 14 files changed, 24 insertions(+), 45 deletions(-)
+
+diff --git a/libpager/Makefile b/libpager/Makefile
+index a15a899..2bfd845 100644
+--- a/libpager/Makefile
++++ b/libpager/Makefile
+@@ -31,7 +31,7 @@ HURDLIBS= ports
+ LDLIBS += -lpthread
+ OBJS = $(SRCS:.c=.o) memory_objectServer.o notifyServer.o
+
+-MIGSFLAGS = -DSEQNOS -imacros $(srcdir)/mig-mutate.h
++MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
+ MIGCOMSFLAGS = -prefix _pager_
+
+ include ../Makeconf
+diff --git a/libpager/chg-compl.c b/libpager/chg-compl.c
+index 89ccfc8..3ffe60a 100644
+--- a/libpager/chg-compl.c
++++ b/libpager/chg-compl.c
+@@ -22,8 +22,7 @@
+ when a memory_object_change_attributes call has completed. Read this
+ in combination with pager-attr.c. */
+ kern_return_t
+-_pager_seqnos_memory_object_change_completed (struct pager *p,
+- mach_port_seqno_t seq,
++_pager_S_memory_object_change_completed (struct pager *p,
+ boolean_t maycache,
+ memory_object_copy_strategy_t strat)
+ {
+diff --git a/libpager/data-request.c b/libpager/data-request.c
+index 18f3de6..7069fc8 100644
+--- a/libpager/data-request.c
++++ b/libpager/data-request.c
+@@ -22,8 +22,7 @@
+
+ /* Implement pagein callback as described in <mach/memory_object.defs>. */
+ kern_return_t
+-_pager_seqnos_memory_object_data_request (struct pager *p,
+- mach_port_seqno_t seqno,
++_pager_S_memory_object_data_request (struct pager *p,
+ mach_port_t control,
+ vm_offset_t offset,
+ vm_size_t length,
+diff --git a/libpager/data-return.c b/libpager/data-return.c
+index f16f323..01f3db2 100644
+--- a/libpager/data-return.c
++++ b/libpager/data-return.c
+@@ -21,13 +21,12 @@
+ #include <string.h>
+ #include <assert.h>
+
+-/* Worker function used by _pager_seqnos_memory_object_data_return
+- and _pager_seqnos_memory_object_data_initialize. All args are
+- as for _pager_seqnos_memory_object_data_return; the additional
++/* Worker function used by _pager_S_memory_object_data_return
++ and _pager_S_memory_object_data_initialize. All args are
++ as for _pager_S_memory_object_data_return; the additional
+ INITIALIZING arg identifies which function is calling us. */
+ kern_return_t
+ _pager_do_write_request (struct pager *p,
+- mach_port_seqno_t seqno,
+ mach_port_t control,
+ vm_offset_t offset,
+ pointer_t data,
+@@ -113,6 +112,7 @@ _pager_do_write_request (struct pager *p,
+ than we really have to require (because *all* future writes on
+ this object are going to wait for seqno while we wait for the
+ previous write), but the case is relatively infrequent. */
++ /* XXX: Is this still needed? */
+ retry:
+ for (i = 0; i < npages; i++)
+ if (pm_entries[i] & PM_PAGINGOUT)
+@@ -254,8 +254,7 @@ _pager_do_write_request (struct pager *p,
+
+ /* Implement pageout call back as described by <mach/memory_object.defs>. */
+ kern_return_t
+-_pager_seqnos_memory_object_data_return (struct pager *p,
+- mach_port_seqno_t seqno,
++_pager_S_memory_object_data_return (struct pager *p,
+ mach_port_t control,
+ vm_offset_t offset,
+ pointer_t data,
+@@ -263,6 +262,6 @@ _pager_seqnos_memory_object_data_return (struct pager *p,
+ int dirty,
+ int kcopy)
+ {
+- return _pager_do_write_request (p, seqno, control, offset, data,
++ return _pager_do_write_request (p, control, offset, data,
+ length, dirty, kcopy, 0);
+ }
+diff --git a/libpager/data-unlock.c b/libpager/data-unlock.c
+index 8c7c776..8c9680c 100644
+--- a/libpager/data-unlock.c
++++ b/libpager/data-unlock.c
+@@ -22,8 +22,7 @@
+ /* Implement kernel requests for access as described in
+ <mach/memory_object.defs>. */
+ kern_return_t
+-_pager_seqnos_memory_object_data_unlock (struct pager *p,
+- mach_port_seqno_t seqno,
++_pager_S_memory_object_data_unlock (struct pager *p,
+ mach_port_t control,
+ vm_offset_t offset,
+ vm_size_t length,
+diff --git a/libpager/demuxer.c b/libpager/demuxer.c
+index a06c4bf..57a6ccb 100644
+--- a/libpager/demuxer.c
++++ b/libpager/demuxer.c
+@@ -88,8 +88,8 @@ pager_demuxer (struct requests *requests,
+ error_t err = MIG_NO_REPLY;
+
+ mig_routine_t routine;
+- if (! ((routine = _pager_seqnos_memory_object_server_routine (inp)) ||
+- (routine = _pager_seqnos_notify_server_routine (inp))))
++ if (! ((routine = _pager_memory_object_server_routine (inp)) ||
++ (routine = _pager_notify_server_routine (inp))))
+ return FALSE;
+
+ #define MASK (8u - 1u)
+diff --git a/libpager/lock-completed.c b/libpager/lock-completed.c
+index 30b1dd3..4b0d87a 100644
+--- a/libpager/lock-completed.c
++++ b/libpager/lock-completed.c
+@@ -23,8 +23,7 @@
+ when a memory_object_lock_request call has completed. Read this
+ in combination with lock-object.c. */
+ kern_return_t
+-_pager_seqnos_memory_object_lock_completed (struct pager *p,
+- mach_port_seqno_t seqno,
++_pager_S_memory_object_lock_completed (struct pager *p,
+ mach_port_t control,
+ vm_offset_t offset,
+ vm_size_t length)
+diff --git a/libpager/no-senders.c b/libpager/no-senders.c
+index d0bbe27..b750101 100644
+--- a/libpager/no-senders.c
++++ b/libpager/no-senders.c
+@@ -21,8 +21,7 @@
+ #include "notify_S.h"
+
+ error_t
+-_pager_do_seqnos_mach_notify_no_senders (struct port_info *pi,
+- mach_port_seqno_t seqno,
++_pager_do_mach_notify_no_senders (struct port_info *pi,
+ mach_port_mscount_t mscount)
+ {
+ if (!pi ||
+diff --git a/libpager/notify-stubs.c b/libpager/notify-stubs.c
+index a826420..6440815 100644
+--- a/libpager/notify-stubs.c
++++ b/libpager/notify-stubs.c
+@@ -23,8 +23,7 @@
+ #include <errno.h>
+
+ error_t
+-_pager_do_seqnos_mach_notify_port_deleted (struct port_info *pi,
+- mach_port_seqno_t seqno,
++_pager_do_mach_notify_port_deleted (struct port_info *pi,
+ mach_port_t name
+ __attribute__ ((unused)))
+ {
+@@ -32,8 +31,7 @@ _pager_do_seqnos_mach_notify_port_deleted (struct port_info *pi,
+ }
+
+ error_t
+-_pager_do_seqnos_mach_notify_msg_accepted (struct port_info *pi,
+- mach_port_seqno_t seqno,
++_pager_do_mach_notify_msg_accepted (struct port_info *pi,
+ mach_port_t name
+ __attribute__ ((unused)))
+ {
+@@ -41,8 +39,7 @@ _pager_do_seqnos_mach_notify_msg_accepted (struct port_info *pi,
+ }
+
+ error_t
+-_pager_do_seqnos_mach_notify_port_destroyed (struct port_info *pi,
+- mach_port_seqno_t seqno,
++_pager_do_mach_notify_port_destroyed (struct port_info *pi,
+ mach_port_t name
+ __attribute__ ((unused)))
+ {
+@@ -50,15 +47,13 @@ _pager_do_seqnos_mach_notify_port_destroyed (struct port_info *pi,
+ }
+
+ error_t
+-_pager_do_seqnos_mach_notify_send_once (struct port_info *pi,
+- mach_port_seqno_t seqno)
++_pager_do_mach_notify_send_once (struct port_info *pi)
+ {
+ return 0;
+ }
+
+ error_t
+-_pager_do_seqnos_mach_notify_dead_name (struct port_info *pi,
+- mach_port_seqno_t seqno,
++_pager_do_mach_notify_dead_name (struct port_info *pi,
+ mach_port_t name
+ __attribute__ ((unused)))
+ {
+diff --git a/libpager/object-init.c b/libpager/object-init.c
+index eb62c44..619d28f 100644
+--- a/libpager/object-init.c
++++ b/libpager/object-init.c
+@@ -22,8 +22,7 @@
+ /* Implement the object initialiation call as described in
+ <mach/memory_object.defs>. */
+ kern_return_t
+-_pager_seqnos_memory_object_init (struct pager *p,
+- mach_port_seqno_t seqno,
++_pager_S_memory_object_init (struct pager *p,
+ mach_port_t control,
+ mach_port_t name,
+ vm_size_t pagesize)
+diff --git a/libpager/object-terminate.c b/libpager/object-terminate.c
+index e8c6f38..9529821 100644
+--- a/libpager/object-terminate.c
++++ b/libpager/object-terminate.c
+@@ -22,8 +22,7 @@
+ /* Implement the object termination call from the kernel as described
+ in <mach/memory_object.defs>. */
+ kern_return_t
+-_pager_seqnos_memory_object_terminate (struct pager *p,
+- mach_port_seqno_t seqno,
++_pager_S_memory_object_terminate (struct pager *p,
+ mach_port_t control,
+ mach_port_t name)
+ {
+diff --git a/libpager/pager-create.c b/libpager/pager-create.c
+index 1fc15b8..b583f02 100644
+--- a/libpager/pager-create.c
++++ b/libpager/pager-create.c
+@@ -42,10 +42,8 @@ pager_create (struct user_pager_info *upi,
+ p->notify_on_evict = notify_on_evict;
+ p->memobjcntl = MACH_PORT_NULL;
+ p->memobjname = MACH_PORT_NULL;
+- p->seqno = -1;
+ p->noterm = 0;
+ p->termwaiting = 0;
+- p->waitingforseqno = 0;
+ p->pagemap = 0;
+ p->pagemapsize = 0;
+
+diff --git a/libpager/priv.h b/libpager/priv.h
+index 4576e12..a45ae3f 100644
+--- a/libpager/priv.h
++++ b/libpager/priv.h
+@@ -55,12 +55,9 @@ struct pager
+ memory_object_control_t memobjcntl;
+ memory_object_name_t memobjname;
+
+- mach_port_seqno_t seqno;
+-
+ int noterm; /* number of threads blocking termination */
+
+ int termwaiting:1;
+- int waitingforseqno:1;
+
+ #ifdef KERNEL_INIT_RACE
+ /* Out of sequence object_init calls waiting for
+diff --git a/libpager/stubs.c b/libpager/stubs.c
+index c7f1a5a..9a766ec 100644
+--- a/libpager/stubs.c
++++ b/libpager/stubs.c
+@@ -21,8 +21,7 @@
+ #include <stdio.h>
+
+ kern_return_t
+-_pager_seqnos_memory_object_copy (struct pager *p,
+- mach_port_seqno_t seq,
++_pager_S_memory_object_copy (struct pager *p,
+ memory_object_control_t obj_ctl,
+ vm_offset_t off,
+ vm_size_t len,
+@@ -33,8 +32,7 @@ _pager_seqnos_memory_object_copy (struct pager *p,
+ }
+
+ kern_return_t
+-_pager_seqnos_memory_object_data_write (struct pager *p,
+- mach_port_seqno_t seq,
++_pager_S_memory_object_data_write (struct pager *p,
+ mach_port_t ctl,
+ vm_offset_t off,
+ pointer_t data,
+@@ -45,8 +43,7 @@ _pager_seqnos_memory_object_data_write (struct pager *p,
+ }
+
+ kern_return_t
+-_pager_seqnos_memory_object_supply_completed (struct pager *p,
+- mach_port_seqno_t seq,
++_pager_S_memory_object_supply_completed (struct pager *p,
+ mach_port_t ctl,
+ vm_offset_t off,
+ vm_size_t len,
+--
+2.1.3
+