1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
From 8a7091da46e1600a2a7c8a2b14cea4c4269746fa 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..1669092 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_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..1ab7f44 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_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..d5707a9 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_memory_object_data_return
+ and _pager_memory_object_data_initialize. All args are
+ as for _pager_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_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..460a3cb 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_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..de3ef85 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_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..985b1ba 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_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..4d07d9c 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_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..06ad118 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_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_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_memory_object_supply_completed (struct pager *p,
mach_port_t ctl,
vm_offset_t off,
vm_size_t len,
--
2.1.3
|