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
|
From a6eff866c3b3a6e3beed6e3c5ec0cdb069c64104 Mon Sep 17 00:00:00 2001
From: Justus Winter <justus@gnupg.org>
Date: Fri, 26 Feb 2016 19:13:11 +0100
Subject: [PATCH gnumach 14/15] include: avoid generating unused client stubs
* include/mach/mach.defs: Avoid generating unused client stubs, some
of which use an unreasonable amount of stack space and showed up in
compiler warnings.
---
include/mach/mach.defs | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/include/mach/mach.defs b/include/mach/mach.defs
index 3786f65..20dc863 100644
--- a/include/mach/mach.defs
+++ b/include/mach/mach.defs
@@ -58,6 +58,9 @@ skip; /* old port_select */
skip; /* old port_set_backlog */
skip; /* old port_status */
+/* We use only a handful of RPCs as client. Skip the rest. */
+#if ! KERNEL_USER
+
/*
* Create a new task with an empty set of IPC rights,
* and having an address space constructed from the
@@ -310,6 +313,18 @@ skip; /* old u*x_pid */
skip; /* old netipc_listen */
skip; /* old netipc_ignore */
+#else /* ! KERNEL_USER */
+
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip;
+
+#endif /* ! KERNEL_USER */
+
/*
* Provide the data contents of a range of the given memory
* object, with the access restriction specified. [Only
@@ -351,6 +366,8 @@ routine memory_object_get_attributes(
out may_cache : boolean_t;
out copy_strategy : memory_object_copy_strategy_t);
+#if ! KERNEL_USER
+
/*
* Sets the default memory manager, the port to which
* newly-created temporary memory objects are delivered.
@@ -361,6 +378,12 @@ routine vm_set_default_memory_manager(
host_priv : host_priv_t;
inout default_manager : mach_port_make_send_t);
+#else /* ! KERNEL_USER */
+
+skip;
+
+#endif /* ! KERNEL_USER */
+
skip; /* old pager_flush_request */
/*
@@ -413,6 +436,8 @@ skip; /* old netport_enter */
skip; /* old netport_remove */
skip; /* old thread_set_priority */
+#if ! KERNEL_USER
+
/*
* Increment the suspend count for the target task.
* No threads within a task may run when the suspend
@@ -613,6 +638,18 @@ routine vm_map(
inheritance : vm_inherit_t);
#endif /* EMULATOR */
+#else /* ! KERNEL_USER */
+
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip; skip;
+skip; skip; skip; skip;
+
+#endif /* ! KERNEL_USER */
+
/*
* Indicate that a range of the specified memory object cannot
* be provided at this time. [Threads waiting for memory pages
@@ -684,6 +721,8 @@ simpleroutine memory_object_change_attributes(
reply_to : mach_port_t =
MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);
+#if ! KERNEL_USER
+
skip; /* old host_callout_statistics_reset */
skip; /* old port_set_select */
skip; /* old port_set_backup */
@@ -702,6 +741,8 @@ routine vm_machine_attribute(
skip; /* old host_fpa_counters_reset */
+#endif /* ! KERNEL_USER */
+
/*
* There is no more room in this interface for additional calls.
*/
--
2.1.4
|