diff options
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | device/device_emul.h | 10 | ||||
-rw-r--r-- | device/ds_routines.c | 10 | ||||
-rw-r--r-- | device/ds_routines.h | 2 | ||||
-rw-r--r-- | kern/task.c | 2 | ||||
-rw-r--r-- | linux/pcmcia-cs/glue/ds.c | 8 | ||||
-rw-r--r-- | vm/vm_kern.c | 4 | ||||
-rw-r--r-- | vm/vm_map.h | 1 |
8 files changed, 47 insertions, 16 deletions
@@ -1,3 +1,29 @@ +2008-11-15 Shakthi Kannan <shakshurd@gmail.com> + + * device/ds_routines.h (device_reference, device_deallocate): Add + function prototypes. + * kern/task.c (task_create): Moved unused i variable inside FAST_TAS. + * vm/vm_map.h (vm_map_copy_page_discard): Add function prototype. + * vm/vm_kern.c (projected_buffer_deallocate): Give &map->hdr + instead of map to _vm_map_clip_start and _vm_map_clip_end functions. + +2008-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * device/device_emul.h (device_emulation_ops): Turn back reference, + dealloc, dev_to_port, write_trap and writev_trap into taking a void*, + as they do not always take a mach_device_t. + * device/ds_routines.c (mach_device_emulation_ops): Cast + mach_device_reference, mach_device_deallocate, + mach_convert_device_to_port, device_write_trap and device_writev_trap + to (void*) to make them accept a void* argument. + * linux/pcmcia-cs/glue/ds.c (device_deallocate): Rename function + into... + (ds_device_deallocate): ... this. + (dev_to_port): Call ds_device_deallocate instead of device_deallocate. + (linux_pcmcia_emulation_ops): Use ds_device_deallocate instead of + device_deallocate, cast mach_device_reference to (void*) to make it + accept a void* argument. + 2008-11-28 Thomas Schwinge <tschwinge@gnu.org> * doc/Makefrag.am: Only advertize updating the web pages on diff --git a/device/device_emul.h b/device/device_emul.h index 879736c..957bd50 100644 --- a/device/device_emul.h +++ b/device/device_emul.h @@ -32,9 +32,9 @@ /* Each emulation layer provides these operations. */ struct device_emulation_ops { - void (*reference) (mach_device_t); - void (*dealloc) (mach_device_t); - ipc_port_t (*dev_to_port) (mach_device_t); + void (*reference) (void *); + void (*dealloc) (void *); + ipc_port_t (*dev_to_port) (void *); io_return_t (*open) (ipc_port_t, mach_msg_type_name_t, dev_mode_t, char *, device_t *); io_return_t (*close) (void *); @@ -55,9 +55,9 @@ struct device_emulation_ops io_return_t (*map) (void *, vm_prot_t, vm_offset_t, vm_size_t, ipc_port_t *, boolean_t); void (*no_senders) (mach_no_senders_notification_t *); - io_return_t (*write_trap) (mach_device_t, dev_mode_t, + io_return_t (*write_trap) (void *, dev_mode_t, recnum_t, vm_offset_t, vm_size_t); - io_return_t (*writev_trap) (mach_device_t, dev_mode_t, + io_return_t (*writev_trap) (void *, dev_mode_t, recnum_t, io_buf_vec_t *, vm_size_t); }; diff --git a/device/ds_routines.c b/device/ds_routines.c index 943185e..9ec5a6b 100644 --- a/device/ds_routines.c +++ b/device/ds_routines.c @@ -1818,9 +1818,9 @@ device_writev_trap (mach_device_t device, dev_mode_t mode, struct device_emulation_ops mach_device_emulation_ops = { - mach_device_reference, - mach_device_deallocate, - mach_convert_device_to_port, + (void*) mach_device_reference, + (void*) mach_device_deallocate, + (void*) mach_convert_device_to_port, device_open, device_close, device_write, @@ -1832,6 +1832,6 @@ struct device_emulation_ops mach_device_emulation_ops = device_set_filter, device_map, ds_no_senders, - device_write_trap, - device_writev_trap + (void*) device_write_trap, + (void*) device_writev_trap }; diff --git a/device/ds_routines.h b/device/ds_routines.h index 24668b4..e1f6aad 100644 --- a/device/ds_routines.h +++ b/device/ds_routines.h @@ -46,6 +46,8 @@ vm_map_t device_io_map; kern_return_t device_read_alloc(io_req_t, vm_size_t); kern_return_t device_write_get(io_req_t, boolean_t *); boolean_t device_write_dealloc(io_req_t); +void device_reference(device_t); +void device_deallocate(device_t); boolean_t ds_notify(mach_msg_header_t *msg); boolean_t ds_open_done(io_req_t); diff --git a/kern/task.c b/kern/task.c index 45c59c5..88da16e 100644 --- a/kern/task.c +++ b/kern/task.c @@ -116,7 +116,9 @@ kern_return_t task_create( { register task_t new_task; register processor_set_t pset; +#if FAST_TAS int i; +#endif new_task = (task_t) zalloc(task_zone); if (new_task == TASK_NULL) { diff --git a/linux/pcmcia-cs/glue/ds.c b/linux/pcmcia-cs/glue/ds.c index 733e4b6..8f88b55 100644 --- a/linux/pcmcia-cs/glue/ds.c +++ b/linux/pcmcia-cs/glue/ds.c @@ -91,7 +91,7 @@ struct mach_socket_device { static void -device_deallocate(void *p) +ds_device_deallocate(void *p) { mach_device_t device = (mach_device_t) p; @@ -146,7 +146,7 @@ dev_to_port(void *d) ipc_port_t port = ipc_port_make_send(dev->port); - device_deallocate(dev); + ds_device_deallocate(dev); return port; } @@ -441,8 +441,8 @@ device_get_status(void *d, dev_flavor_t req, dev_status_t arg, struct device_emulation_ops linux_pcmcia_emulation_ops = { - mach_device_reference, - device_deallocate, + (void*) mach_device_reference, + ds_device_deallocate, dev_to_port, device_open, device_close, diff --git a/vm/vm_kern.c b/vm/vm_kern.c index f29a014..dc7f7e4 100644 --- a/vm/vm_kern.c +++ b/vm/vm_kern.c @@ -269,9 +269,9 @@ projected_buffer_deallocate(map, start, end) /*Prepare for deallocation*/ if (entry->vme_start < start) - _vm_map_clip_start(map, entry, start); + _vm_map_clip_start(&map->hdr, entry, start); if (entry->vme_end > end) - _vm_map_clip_end(map, entry, end); + _vm_map_clip_end(&map->hdr, entry, end); if (map->first_free == entry) /*Adjust first_free hint*/ map->first_free = entry->vme_prev; entry->projected_on = 0; /*Needed to allow deletion*/ diff --git a/vm/vm_map.h b/vm/vm_map.h index 8961e1b..1b8423e 100644 --- a/vm/vm_map.h +++ b/vm/vm_map.h @@ -414,6 +414,7 @@ extern kern_return_t vm_map_copy_overwrite(vm_map_t, vm_offset_t, vm_map_copy_t, boolean_t); /* Discard a copy without using it */ extern void vm_map_copy_discard(vm_map_copy_t); +extern void vm_map_copy_page_discard(vm_map_copy_t); extern vm_map_copy_t vm_map_copy_copy(vm_map_copy_t); /* Page list continuation version of previous */ extern kern_return_t vm_map_copy_discard_cont(vm_map_copyin_args_t, |