summaryrefslogtreecommitdiff
path: root/mach-defpager
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-04-08 01:03:31 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-08 10:55:59 +0200
commita096270c77b1f6461a2ef58660ad9cfa9cbb32bb (patch)
treeb9c713ad70ae6705a1dfe6d76c35c0d918515d2e /mach-defpager
parent5de1b81f0bb24ba38d0a819bba9bd526863b5385 (diff)
Further modernize Hurd code by enforcing strict prototypes and no implicit function declarations.
Most of the changes land in one of these buckets: * Removed unused declarations. * Used (void) to represent no parameters instead of () which means an undeterminate number of parameters. * Included missing header files whenever necessary (stdlib.h, sys/mman.h, etc) * Typedefed function pointers to be able to fully declare the parameter types. * Added declarations of library functions that are used elsewhere (example is libps/ps.h). * Made functions static whenever they are only used in that file. * Forwarded declarations of some methods that were made static. Message-Id: <ZDD1o7/tVYeZew+G@jupiter.tail36e24.ts.net>
Diffstat (limited to 'mach-defpager')
-rw-r--r--mach-defpager/default_pager.c11
-rw-r--r--mach-defpager/default_pager.h5
-rw-r--r--mach-defpager/main.c4
-rw-r--r--mach-defpager/wiring.h6
4 files changed, 13 insertions, 13 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index b8158b35..0e7f20ed 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -2762,11 +2762,12 @@ boolean_t default_pager_notify_server(mach_msg_header_t *in, mach_msg_header_t *
return TRUE;
}
-extern boolean_t seqnos_memory_object_default_server();
-extern boolean_t default_pager_server();
-extern boolean_t exc_server();
-extern boolean_t bootstrap_server();
-extern void bootstrap_compat();
+extern boolean_t seqnos_memory_object_default_server(mach_msg_header_t *in,
+ mach_msg_header_t *out);
+extern boolean_t default_pager_server(mach_msg_header_t *in,
+ mach_msg_header_t *out);
+extern boolean_t exc_server(mach_msg_header_t *in,
+ mach_msg_header_t *out);
mach_msg_size_t default_pager_msg_size_object = 128;
diff --git a/mach-defpager/default_pager.h b/mach-defpager/default_pager.h
index 9de3b551..97d2a343 100644
--- a/mach-defpager/default_pager.h
+++ b/mach-defpager/default_pager.h
@@ -24,7 +24,10 @@
#include <file_io.h>
-void partition_init();
+void default_pager(void);
+void default_pager_initialize(mach_port_t host_port);
+
+void partition_init(void);
void create_paging_partition(const char *name, struct file_direct *fdp,
int isa_file, int linux_signature);
diff --git a/mach-defpager/main.c b/mach-defpager/main.c
index f70b42f0..8fbe2adc 100644
--- a/mach-defpager/main.c
+++ b/mach-defpager/main.c
@@ -54,10 +54,6 @@ const char *defpager_server_name = "mach-defpager";
mach_port_t bootstrap_master_device_port; /* local name */
mach_port_t bootstrap_master_host_port; /* local name */
-extern void default_pager();
-extern void default_pager_initialize();
-extern void default_pager_setup();
-
/* initialized in default_pager_initialize */
extern mach_port_t default_pager_exception_port;
diff --git a/mach-defpager/wiring.h b/mach-defpager/wiring.h
index e545834d..9d99f33a 100644
--- a/mach-defpager/wiring.h
+++ b/mach-defpager/wiring.h
@@ -29,6 +29,6 @@
#include <mach.h>
#include <mach_init.h>
-extern void wire_setup(/* mach_port_t host_priv */);
-extern void wire_thread();
-extern void wire_all_memory();
+extern void wire_setup(mach_port_t host_priv);
+extern void wire_thread(void);
+extern void wire_all_memory(void);