diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-03-18 23:18:11 -0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-03 00:22:08 +0200 |
commit | 0209b2c932994e9ca55d39d98a83ea02aacd1332 (patch) | |
tree | f8778cca656943ee36193b49a7727557ba82319b /mach-defpager | |
parent | 6f3d68bc8b46bdc7b0f5f43918744d99746672a2 (diff) | |
download | hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.tar.gz hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.tar.bz2 hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.zip |
Modernize code by removing use of old style definitions.
Also add -Werror=old-style-definition to enforce new code.
Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
Diffstat (limited to 'mach-defpager')
-rw-r--r-- | mach-defpager/default_pager.c | 379 | ||||
-rw-r--r-- | mach-defpager/setup.c | 7 | ||||
-rw-r--r-- | mach-defpager/wiring.c | 5 |
3 files changed, 159 insertions, 232 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c index 4ba9763f..b8158b35 100644 --- a/mach-defpager/default_pager.c +++ b/mach-defpager/default_pager.c @@ -116,17 +116,15 @@ synchronized_printf (const char *fmt, ...) #define ptoa(p) ((p)*vm_page_size) #define atop(a) ((a)/vm_page_size) -partition_t partition_of(x) - int x; +partition_t partition_of(int x) { if (x >= all_partitions.n_partitions || x < 0) panic("partition_of x%x", x); return all_partitions.partition_list[x]; } -void set_partition_of(x, p) - int x; - partition_t p; +void set_partition_of(int x, + partition_t p) { if (x >= all_partitions.n_partitions || x < 0) panic("set_partition_of x%x", x); @@ -153,7 +151,7 @@ part_id(const char *name) } void -partition_init() +partition_init(void) { pthread_mutex_init(&all_partitions.lock, NULL); all_partitions.n_partitions = 0; @@ -465,9 +463,8 @@ create_paging_partition(const char *name, * the object has no CUR_PARTition. */ p_index_t -choose_partition(size, cur_part) - unsigned int size; - p_index_t cur_part; +choose_partition(unsigned int size, + p_index_t cur_part) { partition_t part; boolean_t found = FALSE; @@ -511,9 +508,8 @@ ddprintf ("choose_partition(%x,%d,%d)\n",size,cur_part,i); * The partition is returned unlocked. */ vm_offset_t -pager_alloc_page(pindex, lock_it) - p_index_t pindex; - boolean_t lock_it; +pager_alloc_page(p_index_t pindex, + boolean_t lock_it) { int bm_e; int bit; @@ -575,10 +571,9 @@ ddprintf ("pager_alloc_page(%d,%d)\n",pindex,lock_it); * Deallocate a page in a paging partition */ void -pager_dealloc_page(pindex, page, lock_it) - p_index_t pindex; - vm_offset_t page; - boolean_t lock_it; +pager_dealloc_page(p_index_t pindex, + vm_offset_t page, + boolean_t lock_it) { partition_t part; int bit, bm_e; @@ -615,8 +610,7 @@ vm_size_t max_doubled_size = 4 * 1024 * 1024; /* 4 meg */ * Return first level map for pager. * If there is no such map, than allocate it. */ -dp_map_t pager_get_direct_map(pager) - dpager_t pager; +dp_map_t pager_get_direct_map(dpager_t pager) { dp_map_t mapptr, emapptr; vm_size_t size = pager->size; @@ -652,10 +646,9 @@ dp_map_t pager_get_direct_map(pager) * Attach a new paging object to a paging partition */ void -pager_alloc(pager, part, size) - dpager_t pager; - p_index_t part; - vm_size_t size; /* in BYTES */ +pager_alloc(dpager_t pager, + p_index_t part, + vm_size_t size /* in BYTES */) { int i; #ifdef CHECKSUM @@ -707,8 +700,7 @@ pager_alloc(pager, part, size) */ vm_size_t -pager_allocated(pager) - dpager_t pager; +pager_allocated(dpager_t pager) { vm_size_t size; dp_map_t map, emap; @@ -749,10 +741,9 @@ pager_allocated(pager) */ unsigned int -pager_pages(pager, pages, numpages) - dpager_t pager; - default_pager_page_t *pages; - unsigned int numpages; +pager_pages(dpager_t pager, + default_pager_page_t *pages, + unsigned int numpages) { vm_size_t size; dp_map_t map, emap; @@ -803,9 +794,8 @@ pager_pages(pager, pages, numpages) * system memory. */ void -pager_extend(pager, new_size) - dpager_t pager; - vm_size_t new_size; /* in pages */ +pager_extend(dpager_t pager, + vm_size_t new_size /* in pages */) { dp_map_t new_mapptr; dp_map_t old_mapptr; @@ -1072,9 +1062,8 @@ pager_truncate(dpager_t pager, vm_size_t new_size) /* in pages */ * Return NO_BLOCK if none allocated. */ union dp_map -pager_read_offset(pager, offset) - dpager_t pager; - vm_offset_t offset; +pager_read_offset(dpager_t pager, + vm_offset_t offset) { vm_offset_t f_page; union dp_map pager_offset; @@ -1127,9 +1116,8 @@ pager_read_offset(pager, offset) /* * Release a single disk block. */ -void pager_release_offset(pager, offset) - dpager_t pager; - vm_offset_t offset; +void pager_release_offset(dpager_t pager, + vm_offset_t offset) { union dp_map entry; @@ -1162,8 +1150,7 @@ void pager_release_offset(pager, offset) * locked unless LOCK_OLD sez otherwise. */ union dp_map -pager_move_page(block) - union dp_map block; +pager_move_page(union dp_map block) { partition_t old_part, new_part; p_index_t old_pindex, new_pindex; @@ -1226,9 +1213,8 @@ ddprintf ("pager_move_page(%x,%d,%d)\n",block.block.p_offset,old_pindex,new_pind * Return the checksum for a block. */ int -pager_get_checksum(pager, offset) - dpager_t pager; - vm_offset_t offset; +pager_get_checksum(dpager_t pager, + vm_offset_t offset) { vm_offset_t f_page; int checksum; @@ -1260,10 +1246,9 @@ pager_get_checksum(pager, offset) * Remember the checksum for a block. */ int -pager_put_checksum(pager, offset, checksum) - dpager_t pager; - vm_offset_t offset; - int checksum; +pager_put_checksum(dpager_t pager, + vm_offset_t offset, + int checksum) { vm_offset_t f_page; static char here[] = "%spager_put_checksum"; @@ -1320,9 +1305,8 @@ compute_checksum(addr, size) * without notice! */ union dp_map -pager_write_offset(pager, offset) - dpager_t pager; - vm_offset_t offset; +pager_write_offset(dpager_t pager, + vm_offset_t offset) { vm_offset_t f_page; dp_map_t mapptr; @@ -1488,8 +1472,7 @@ out: * No locking needed because no other operations can be in progress. */ void -pager_dealloc(pager) - dpager_t pager; +pager_dealloc(dpager_t pager) { int i, j; dp_map_t mapptr; @@ -1548,9 +1531,8 @@ pager_dealloc(pager) * some pages might have been moved nonetheless. */ boolean_t -pager_realloc(pager, pindex) - dpager_t pager; - p_index_t pindex; +pager_realloc(dpager_t pager, + p_index_t pindex) { dp_map_t map, emap; vm_size_t size; @@ -1613,15 +1595,14 @@ ok: * if it is different from <addr>, it must be deallocated after use. */ int -default_read(ds, addr, size, offset, out_addr, deallocate, external) - dpager_t ds; - vm_offset_t addr; /* pointer to block to fill */ - vm_size_t size; - vm_offset_t offset; - vm_offset_t *out_addr; +default_read(dpager_t ds, + vm_offset_t addr, /* pointer to block to fill */ + vm_size_t size, + vm_offset_t offset, + vm_offset_t *out_addr, /* returns pointer to data */ - boolean_t deallocate; - boolean_t external; + boolean_t deallocate, + boolean_t external) { union dp_map block; vm_offset_t raddr; @@ -1711,11 +1692,10 @@ ddprintf ("default_read(%lx,%x,%lx,%d)\n",addr,size,offset,block.block.p_index); } int -default_write(ds, addr, size, offset) - dpager_t ds; - vm_offset_t addr; - vm_size_t size; - vm_offset_t offset; +default_write(dpager_t ds, + vm_offset_t addr, + vm_size_t size, + vm_offset_t offset) { union dp_map block; partition_t part; @@ -1771,9 +1751,8 @@ ddprintf ("default_write(%lx,%x,%lx,%d)\n",addr,size,offset,block.block.p_index) } boolean_t -default_has_page(ds, offset) - dpager_t ds; - vm_offset_t offset; +default_has_page(dpager_t ds, + vm_offset_t offset) { return ( ! no_block(pager_read_offset(ds, offset)) ); } @@ -1798,9 +1777,8 @@ struct pager_port all_pagers; queue_init(&all_pagers.leak_queue); \ } -void pager_port_list_insert(port, ds) - mach_port_t port; - default_pager_t ds; +void pager_port_list_insert(mach_port_t port, + default_pager_t ds) { pthread_mutex_lock(&all_pagers.lock); hurd_ihash_add (&all_pagers.htable, @@ -1815,8 +1793,7 @@ void pager_port_list_insert(port, ds) (unsigned long) ds); } -void pager_port_list_delete(ds) - default_pager_t ds; +void pager_port_list_delete(default_pager_t ds) { pthread_mutex_lock(&all_pagers.lock); hurd_ihash_locp_remove (&all_pagers.htable, @@ -1832,9 +1809,8 @@ void pager_port_list_delete(ds) * XXX this is not re-entrant XXX */ kern_return_t -destroy_paging_partition(name, pp_private) - const char *name; - void **pp_private; +destroy_paging_partition(const char *name, + void **pp_private) { unsigned int id = part_id(name); partition_t part = NULL; @@ -1945,9 +1921,8 @@ unsigned int default_pager_wait_refs = 0; /* debugging */ /* * Waits for correct sequence number. Leaves pager locked. */ -void pager_port_lock(ds, seqno) - default_pager_t ds; - mach_port_seqno_t seqno; +void pager_port_lock(default_pager_t ds, + mach_port_seqno_t seqno) { default_pager_total++; dstruct_lock(ds); @@ -1960,8 +1935,7 @@ void pager_port_lock(ds, seqno) /* * Increments sequence number and unlocks pager. */ -void pager_port_unlock(ds) - default_pager_t ds; +void pager_port_unlock(default_pager_t ds) { ds->seqno++; pthread_cond_broadcast(&ds->waiting_seqno); @@ -1971,8 +1945,7 @@ void pager_port_unlock(ds) /* * Start a read - one more reader. Pager must be locked. */ -void pager_port_start_read(ds) - default_pager_t ds; +void pager_port_start_read(default_pager_t ds) { ds->readers++; } @@ -1980,8 +1953,7 @@ void pager_port_start_read(ds) /* * Wait for readers. Unlocks and relocks pager if wait needed. */ -void pager_port_wait_for_readers(ds) - default_pager_t ds; +void pager_port_wait_for_readers(default_pager_t ds) { while (ds->readers != 0) { default_pager_wait_read++; @@ -1992,8 +1964,7 @@ void pager_port_wait_for_readers(ds) /* * Finish a read. Pager is unlocked and returns unlocked. */ -void pager_port_finish_read(ds) - default_pager_t ds; +void pager_port_finish_read(default_pager_t ds) { dstruct_lock(ds); if (--ds->readers == 0) { @@ -2008,8 +1979,7 @@ void pager_port_finish_read(ds) /* * Start a write - one more writer. Pager must be locked. */ -void pager_port_start_write(ds) - default_pager_t ds; +void pager_port_start_write(default_pager_t ds) { ds->writers++; } @@ -2017,8 +1987,7 @@ void pager_port_start_write(ds) /* * Wait for writers. Unlocks and relocks pager if wait needed. */ -void pager_port_wait_for_writers(ds) - default_pager_t ds; +void pager_port_wait_for_writers(default_pager_t ds) { while (ds->writers != 0) { default_pager_wait_write++; @@ -2029,8 +1998,7 @@ void pager_port_wait_for_writers(ds) /* * Finish a write. Pager is unlocked and returns unlocked. */ -void pager_port_finish_write(ds) - default_pager_t ds; +void pager_port_finish_write(default_pager_t ds) { dstruct_lock(ds); if (--ds->writers == 0) { @@ -2046,8 +2014,7 @@ void pager_port_finish_write(ds) * Wait for concurrent default_pager_objects. * Unlocks and relocks pager if wait needed. */ -void pager_port_wait_for_refs(ds) - default_pager_t ds; +void pager_port_wait_for_refs(default_pager_t ds) { while (ds->name_refs == 0) { default_pager_wait_refs++; @@ -2058,8 +2025,7 @@ void pager_port_wait_for_refs(ds) /* * Finished creating name refs - wake up waiters. */ -void pager_port_finish_refs(ds) - default_pager_t ds; +void pager_port_finish_refs(default_pager_t ds) { pthread_cond_broadcast(&ds->waiting_refs); } @@ -2115,8 +2081,7 @@ unsigned int default_pager_internal_count = DEFAULT_PAGER_INTERNAL_COUNT; unsigned int default_pager_external_count = DEFAULT_PAGER_EXTERNAL_COUNT; /* Number of "external" threads. */ -default_pager_t pager_port_alloc(size) - vm_size_t size; +default_pager_t pager_port_alloc(vm_size_t size) { default_pager_t ds; p_index_t part; @@ -2156,9 +2121,8 @@ mach_port_urefs_t default_pager_max_urefs = 10000; * Pager must be locked. * Unlocks and re-locks pager if needs to call kernel. */ -void pager_port_check_request(ds, pager_request) - default_pager_t ds; - mach_port_t pager_request; +void pager_port_check_request(default_pager_t ds, + mach_port_t pager_request) { mach_port_delta_t delta; kern_return_t kr; @@ -2184,9 +2148,8 @@ void pager_port_check_request(ds, pager_request) } } -void default_pager_add(ds, internal) - default_pager_t ds; - boolean_t internal; +void default_pager_add(default_pager_t ds, + boolean_t internal) { mach_port_t pager = ds->pager; mach_port_t pset; @@ -2236,15 +2199,13 @@ void default_pager_add(ds, internal) * be so paranoid about the contents. */ kern_return_t -seqnos_memory_object_create(old_pager, seqno, new_pager, new_size, - new_pager_request, new_pager_name, new_page_size) - mach_port_t old_pager; - mach_port_seqno_t seqno; - mach_port_t new_pager; - vm_size_t new_size; - mach_port_t new_pager_request; - mach_port_t new_pager_name; - vm_size_t new_page_size; +seqnos_memory_object_create(mach_port_t old_pager, + mach_port_seqno_t seqno, + mach_port_t new_pager, + vm_size_t new_size, + mach_port_t new_pager_request, + mach_port_t new_pager_name, + vm_size_t new_page_size) { default_pager_t ds; @@ -2281,13 +2242,11 @@ memory_object_copy_strategy_t default_pager_copy_strategy = MEMORY_OBJECT_COPY_DELAY; kern_return_t -seqnos_memory_object_init(ds, seqno, pager_request, pager_name, - pager_page_size) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_t pager_request; - mach_port_t pager_name; - vm_size_t pager_page_size; +seqnos_memory_object_init(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_t pager_request, + mach_port_t pager_name, + vm_size_t pager_page_size) { kern_return_t kr; static char here[] = "%sinit"; @@ -2327,11 +2286,10 @@ seqnos_memory_object_init(ds, seqno, pager_request, pager_name, } kern_return_t -seqnos_memory_object_terminate(ds, seqno, pager_request, pager_name) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_t pager_request; - mach_port_t pager_name; +seqnos_memory_object_terminate(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_t pager_request, + mach_port_t pager_name) { static char here[] = "%sterminate"; @@ -2387,10 +2345,9 @@ ddprintf ("seqnos_memory_object_terminate <%p>: pager_port_unlock: <%p>[s:%d,r:% return (KERN_SUCCESS); } -void default_pager_no_senders(ds, seqno, mscount) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_mscount_t mscount; +void default_pager_no_senders(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_mscount_t mscount) { kern_return_t kr; static char here[] = "%sno_senders"; @@ -2462,14 +2419,12 @@ int default_pager_pageout_count = 0; static __thread default_pager_thread_t *dpt; kern_return_t -seqnos_memory_object_data_request(ds, seqno, reply_to, offset, - length, protection_required) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_t reply_to; - vm_offset_t offset; - vm_size_t length; - vm_prot_t protection_required; +seqnos_memory_object_data_request(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_t reply_to, + vm_offset_t offset, + vm_size_t length, + vm_prot_t protection_required) { vm_offset_t addr; unsigned int errors; @@ -2563,16 +2518,12 @@ ddprintf ("seqnos_memory_object_data_request <%p>: pager_port_unlock: <%p>[s:%d, * also assumes that the default_pager is single-threaded. */ kern_return_t -seqnos_memory_object_data_initialize(ds, seqno, pager_request, - offset, addr, data_cnt) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_t pager_request; - register - vm_offset_t offset; - register - pointer_t addr; - mach_msg_type_number_t data_cnt; +seqnos_memory_object_data_initialize(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_t pager_request, + vm_offset_t offset, + pointer_t addr, + mach_msg_type_number_t data_cnt) { vm_offset_t amount_sent; static char here[] = "%sdata_initialize"; @@ -2623,17 +2574,14 @@ ddprintf ("seqnos_memory_object_data_initialize <%p>: pager_port_unlock: <%p>[s: * into individual pages and pass them off to default_write. */ kern_return_t -seqnos_memory_object_data_return(ds, seqno, pager_request, - offset, addr, data_cnt, - dirty, kernel_copy) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_t pager_request; - vm_offset_t offset; - pointer_t addr; - mach_msg_type_number_t data_cnt; - boolean_t dirty; - boolean_t kernel_copy; +seqnos_memory_object_data_return(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_t pager_request, + vm_offset_t offset, + pointer_t addr, + mach_msg_type_number_t data_cnt, + boolean_t dirty, + boolean_t kernel_copy) { register vm_size_t amount_sent; @@ -2707,15 +2655,13 @@ seqnos_memory_object_data_return(ds, seqno, pager_request, /*ARGSUSED*/ kern_return_t -seqnos_memory_object_copy(old_memory_object, seqno, old_memory_control, - offset, length, new_memory_object) - default_pager_t old_memory_object; - mach_port_seqno_t seqno; +seqnos_memory_object_copy(default_pager_t old_memory_object, + mach_port_seqno_t seqno, memory_object_control_t - old_memory_control; - vm_offset_t offset; - vm_size_t length; - memory_object_t new_memory_object; + old_memory_control, + vm_offset_t offset, + vm_size_t length, + memory_object_t new_memory_object) { panic("%scopy", my_name); return KERN_FAILURE; @@ -2735,49 +2681,42 @@ seqnos_memory_object_lock_completed (default_pager_t ds, } kern_return_t -seqnos_memory_object_data_unlock(pager, seqno, pager_request, - offset, length, protection_required) - default_pager_t pager; - mach_port_seqno_t seqno; - mach_port_t pager_request; - vm_offset_t offset; - vm_size_t length; - vm_prot_t protection_required; +seqnos_memory_object_data_unlock(default_pager_t pager, + mach_port_seqno_t seqno, + mach_port_t pager_request, + vm_offset_t offset, + vm_size_t length, + vm_prot_t protection_required) { panic("%sdata_unlock",my_name); return(KERN_FAILURE); } kern_return_t -seqnos_memory_object_supply_completed(ds, seqno, pager_request, - offset, length, - result, error_offset) - default_pager_t ds; - mach_port_seqno_t seqno; - mach_port_t pager_request; - vm_offset_t offset; - vm_size_t length; - kern_return_t result; - vm_offset_t error_offset; +seqnos_memory_object_supply_completed(default_pager_t ds, + mach_port_seqno_t seqno, + mach_port_t pager_request, + vm_offset_t offset, + vm_size_t length, + kern_return_t result, + vm_offset_t error_offset) { panic("%ssupply_completed",my_name); return(KERN_FAILURE); } kern_return_t -seqnos_memory_object_change_completed(ds, seqno, may_cache, copy_strategy) - default_pager_t ds; - mach_port_seqno_t seqno; - boolean_t may_cache; - memory_object_copy_strategy_t copy_strategy; +seqnos_memory_object_change_completed(default_pager_t ds, + mach_port_seqno_t seqno, + boolean_t may_cache, + memory_object_copy_strategy_t copy_strategy) { panic("%schange_completed",my_name); return(KERN_FAILURE); } -boolean_t default_pager_notify_server(in, out) - mach_msg_header_t *in, *out; +boolean_t default_pager_notify_server(mach_msg_header_t *in, mach_msg_header_t *out) { default_pager_t ds; @@ -2863,9 +2802,8 @@ mig_reply_setup ( } boolean_t -default_pager_demux_object(in, out) - mach_msg_header_t *in; - mach_msg_header_t *out; +default_pager_demux_object( mach_msg_header_t *in, + mach_msg_header_t *out) { /* * We receive memory_object_data_initialize messages in @@ -2894,9 +2832,8 @@ default_pager_demux_object(in, out) mach_msg_size_t default_pager_msg_size_default = 8 * 1024; boolean_t -default_pager_demux_default(in, out) - mach_msg_header_t *in; - mach_msg_header_t *out; +default_pager_demux_default(mach_msg_header_t *in, + mach_msg_header_t *out) { if (in->msgh_local_port == default_pager_default_port) { /* @@ -2945,7 +2882,7 @@ return rval; */ void -default_pager_thread_privileges() +default_pager_thread_privileges(void) { /* * Set thread privileges. @@ -3001,8 +2938,7 @@ default_pager_thread(void *arg) } void -start_default_pager_thread(internal) - boolean_t internal; +start_default_pager_thread(boolean_t internal) { default_pager_thread_t *ndpt; kern_return_t kr; @@ -3030,8 +2966,7 @@ start_default_pager_thread(internal) } void -default_pager_initialize(host_port) - mach_port_t host_port; +default_pager_initialize(mach_port_t host_port) { memory_object_t DMM; kern_return_t kr; @@ -3092,7 +3027,7 @@ default_pager_initialize(host_port) * Initialize and Run the default pager */ void -default_pager() +default_pager(void) { error_t err; kern_return_t kr; @@ -3727,11 +3662,10 @@ extern mach_port_t bootstrap_master_device_port; extern mach_port_t bootstrap_master_host_port; kern_return_t -S_default_pager_paging_file (pager, mdport, file_name, add) - mach_port_t pager; - mach_port_t mdport; - const_default_pager_filename_t file_name; - boolean_t add; +S_default_pager_paging_file (mach_port_t pager, + mach_port_t mdport, + const_default_pager_filename_t file_name, + boolean_t add) { kern_return_t kr; @@ -3756,9 +3690,8 @@ dprintf("bmd %x md %x\n", bootstrap_master_device_port, mdport); } kern_return_t -default_pager_register_fileserver(pager, fileserver) - mach_port_t pager; - mach_port_t fileserver; +default_pager_register_fileserver(mach_port_t pager, + mach_port_t fileserver) { if (pager != default_pager_default_port) return KERN_INVALID_ARGUMENT; @@ -3772,8 +3705,7 @@ default_pager_register_fileserver(pager, fileserver) /* * When things do not quite workout... */ -void no_paging_space(out_of_memory) - boolean_t out_of_memory; +void no_paging_space(boolean_t out_of_memory) { static char here[] = "%s *** NOT ENOUGH PAGING SPACE ***"; @@ -3782,9 +3714,8 @@ void no_paging_space(out_of_memory) panic(here, my_name); } -void overcommitted(got_more_space, space) - boolean_t got_more_space; - vm_size_t space; /* in pages */ +void overcommitted(boolean_t got_more_space, + vm_size_t space /* in pages */) { vm_size_t pages_free, pages_total; @@ -3825,8 +3756,7 @@ void overcommitted(got_more_space, space) #endif } -void paging_space_info(totp, freep) - vm_size_t *totp, *freep; +void paging_space_info(vm_size_t *totp, vm_size_t *freep) { vm_size_t total, free; partition_t part; @@ -3856,10 +3786,9 @@ void paging_space_info(totp, freep) */ kern_return_t -catch_exception_raise(exception_port, thread, task, exception, code, subcode) - mach_port_t exception_port; - mach_port_t thread, task; - int exception, code, subcode; +catch_exception_raise(mach_port_t exception_port, + mach_port_t thread, mach_port_t task, + int exception, int code, int subcode) { ddprintf ("(default_pager)catch_exception_raise(%d,%d,%d)\n", exception, code, subcode); diff --git a/mach-defpager/setup.c b/mach-defpager/setup.c index a1e7fe4e..7b32ea9f 100644 --- a/mach-defpager/setup.c +++ b/mach-defpager/setup.c @@ -240,10 +240,9 @@ page_write_file_direct(struct file_direct *fdp, /* Compatibility entry points used by default_pager_paging_file RPC. */ kern_return_t -add_paging_file(master_device_port, file_name, linux_signature) - mach_port_t master_device_port; - const char *file_name; - int linux_signature; +add_paging_file(mach_port_t master_device_port, + const char *file_name, + int linux_signature) { error_t err; mach_port_t dev; diff --git a/mach-defpager/wiring.c b/mach-defpager/wiring.c index 43ed91de..cb53de4c 100644 --- a/mach-defpager/wiring.c +++ b/mach-defpager/wiring.c @@ -37,15 +37,14 @@ mach_port_t priv_host_port = MACH_PORT_NULL; /* the privileged host port */ void -wire_setup(host_priv) - mach_port_t host_priv; +wire_setup(mach_port_t host_priv) { priv_host_port = host_priv; this_task = mach_task_self(); } void -wire_thread() +wire_thread(void) { kern_return_t kr; |