aboutsummaryrefslogtreecommitdiff
path: root/vm/vm_map.h
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-12-20 20:01:02 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-21 12:55:46 +0100
commit448889a4f0c32ba8ea61f870d4edcb0e0d58af85 (patch)
treecad56c7263667bb09096cc05c707130d3809544a /vm/vm_map.h
parent28ac48ba2371ad6f76f263e56dcf0090fe0d6087 (diff)
downloadgnumach-448889a4f0c32ba8ea61f870d4edcb0e0d58af85.tar.gz
gnumach-448889a4f0c32ba8ea61f870d4edcb0e0d58af85.tar.bz2
gnumach-448889a4f0c32ba8ea61f870d4edcb0e0d58af85.zip
Use -Wstrict-prototypes and fix warnings
Most of the changes include defining and using proper function type declarations (with argument types declared) and avoiding using the K&R style of function declarations. Message-Id: <Y6Jazsuis1QA0lXI@mars>
Diffstat (limited to 'vm/vm_map.h')
-rw-r--r--vm/vm_map.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/vm/vm_map.h b/vm/vm_map.h
index 57bdf651..3d1c9428 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -255,6 +255,10 @@ typedef struct vm_map_version {
#define VM_MAP_COPY_PAGE_LIST_MAX 64
+struct vm_map_copy;
+struct vm_map_copyin_args_data;
+typedef kern_return_t (*vm_map_copy_cont_fn)(struct vm_map_copyin_args_data*, struct vm_map_copy**);
+
typedef struct vm_map_copy {
int type;
#define VM_MAP_COPY_ENTRY_LIST 1
@@ -270,8 +274,8 @@ typedef struct vm_map_copy {
struct { /* PAGE_LIST */
vm_page_t page_list[VM_MAP_COPY_PAGE_LIST_MAX];
int npages;
- kern_return_t (*cont)();
- char *cont_args;
+ vm_map_copy_cont_fn cont;
+ struct vm_map_copyin_args_data* cont_args;
} c_p;
} c_u;
} *vm_map_copy_t;
@@ -323,7 +327,7 @@ MACRO_BEGIN \
(*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args, \
(vm_map_copy_t *) 0); \
(old_copy)->cpy_cont = (kern_return_t (*)()) 0; \
- (old_copy)->cpy_cont_args = (char *) 0; \
+ (old_copy)->cpy_cont_args = VM_MAP_COPYIN_ARGS_NULL; \
MACRO_END
#define vm_map_copy_has_cont(copy) \
@@ -333,14 +337,14 @@ MACRO_END
* Continuation structures for vm_map_copyin_page_list.
*/
-typedef struct {
+typedef struct vm_map_copyin_args_data {
vm_map_t map;
vm_offset_t src_addr;
vm_size_t src_len;
vm_offset_t destroy_addr;
vm_size_t destroy_len;
boolean_t steal_pages;
-} vm_map_copyin_args_data_t, *vm_map_copyin_args_t;
+} vm_map_copyin_args_data_t, *vm_map_copyin_args_t;
#define VM_MAP_COPYIN_ARGS_NULL ((vm_map_copyin_args_t) 0)