[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Compiler fixes for ipc_mig.c, task.c, memory_object.c, vm_ke
From: |
Shakthi Kannan |
Subject: |
Re: [PATCH] Compiler fixes for ipc_mig.c, task.c, memory_object.c, vm_kern.c |
Date: |
Sat, 15 Nov 2008 00:47:46 +0530 |
Hi,
--- On Fri, Nov 14, 2008 at 5:25 AM, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
| +void device_deallocate (device_t dev);
|
| Err, no, these should rather to go ds_routines.h...
\--
There is a conflict for device_deallocate when put in ds_routines.h
for linux/pcmcia-cs/glue/ds.c:444 which uses:
void device_deallocate (void *p).
So, I have added only device_reference prototype in ds_routines.h.
Other changes have been incorporated.
---
2008-11-15 Shakthi Kannan <shakshurd@gmail.com>
* device/ds_routines.h: Added function prototypes for device_reference.
* kern/task.c (task_create): Moved unused i variable inside FAST_TAS.
* vm/vm_map.h: Added function prototype for
vm_map_copy_page_discard.
* vm/vm_kern.c (projected_buffer_deallocate): &map->hdr entry for
_vm_map_clip_start and _vm_map_clip_end function invocations.
---
diff --git a/device/ds_routines.h b/device/ds_routines.h
index 24668b4..40213f3 100644
--- a/device/ds_routines.h
+++ b/device/ds_routines.h
@@ -47,11 +47,16 @@ 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);
+
boolean_t ds_notify(mach_msg_header_t *msg);
boolean_t ds_open_done(io_req_t);
boolean_t ds_read_done(io_req_t);
boolean_t ds_write_done(io_req_t);
+
+
+
void iowait (io_req_t ior);
#endif /* DS_ROUTINES_H */
diff --git a/kern/task.c b/kern/task.c
index 45c59c5..8c18c43 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -116,7 +116,10 @@ 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/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..c8044ea 100644
--- a/vm/vm_map.h
+++ b/vm/vm_map.h
@@ -415,6 +415,8 @@ extern
kern_return_t vm_map_copy_overwrite(vm_map_t, vm_offset_t,
/* Discard a copy without using it */
extern void vm_map_copy_discard(vm_map_copy_t);
extern vm_map_copy_t vm_map_copy_copy(vm_map_copy_t);
+extern void vm_map_copy_page_discard(vm_map_copy_t);
+
/* Page list continuation version of previous */
extern kern_return_t vm_map_copy_discard_cont(vm_map_copyin_args_t,
vm_map_copy_t *);
--
1.5.6
0001-Compiler-fixes-for-ipc_mig.c-task.c-memory_object.patch
Description: Text Data