diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-07 17:22:31 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-10 13:45:05 +0100 |
commit | f878de5006045c849415afffaffc909458b5f6de (patch) | |
tree | 7fb35887cabc60987614b02b45eb2ae0517bda4a /libpager | |
parent | 808073c49814b415b7ad6226a3e8c95bb1dbc277 (diff) |
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.
Diffstat (limited to 'libpager')
-rw-r--r-- | libpager/Makefile | 2 | ||||
-rw-r--r-- | libpager/chg-compl.c | 3 | ||||
-rw-r--r-- | libpager/data-request.c | 3 | ||||
-rw-r--r-- | libpager/data-return.c | 13 | ||||
-rw-r--r-- | libpager/data-unlock.c | 3 | ||||
-rw-r--r-- | libpager/demuxer.c | 4 | ||||
-rw-r--r-- | libpager/lock-completed.c | 3 | ||||
-rw-r--r-- | libpager/no-senders.c | 3 | ||||
-rw-r--r-- | libpager/notify-stubs.c | 15 | ||||
-rw-r--r-- | libpager/object-init.c | 3 | ||||
-rw-r--r-- | libpager/object-terminate.c | 3 | ||||
-rw-r--r-- | libpager/pager-create.c | 2 | ||||
-rw-r--r-- | libpager/priv.h | 3 | ||||
-rw-r--r-- | libpager/stubs.c | 9 |
14 files changed, 24 insertions, 45 deletions
diff --git a/libpager/Makefile b/libpager/Makefile index a15a899b..2bfd8450 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 89ccfc8b..3ffe60a0 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 18f3de66..7069fc84 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 f16f3238..01f3db2d 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 8c7c776d..8c9680c4 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 a06c4bfa..57a6ccb9 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 30b1dd3d..4b0d87a3 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 d0bbe27b..b7501018 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 a8264203..64408157 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 eb62c443..619d28f3 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 e8c6f381..95298217 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 1fc15b83..b583f023 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 4576e127..a45ae3fc 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 c7f1a5a1..9a766ec4 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, |