summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-02-26 19:13:11 +0100
committerJustus Winter <justus@gnupg.org>2016-02-26 20:15:36 +0100
commit30426d4313733dc64f08d3d2c2ef3c36df252ef3 (patch)
tree044787607847e8dee5898c9a2dbdb8edf66dd7b4
parenta90e974f2dedd4a9c469f20ae8e009839261351f (diff)
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.
-rw-r--r--include/mach/mach.defs41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/mach/mach.defs b/include/mach/mach.defs
index 3786f657..20dc8637 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.
*/