From 287956ae8878462ca4336017e7ba6c033748c442 Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 8 Jan 1994 04:38:16 +0000 Subject: [PATCH] Yet more prototypes. --- sys/vm/vm_object.c | 12 +---------- sys/vm/vm_object.h | 52 ++++++++++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 3bf31b6ad926..cdadd04a5476 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_object.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_object.c,v 1.13 1994/01/07 22:22:24 mycroft Exp $ + * $Id: vm_object.c,v 1.14 1994/01/08 04:38:16 mycroft Exp $ * * * Copyright (c) 1987, 1990 Carnegie-Mellon University. @@ -75,8 +75,6 @@ #include static void _vm_object_allocate __P((vm_size_t, vm_object_t)); -void vm_object_page_clean - __P((vm_object_t, vm_offset_t, vm_offset_t)); static void vm_object_deactivate_pages __P((vm_object_t)); static void vm_object_cache_trim __P((void)); static void vm_object_remove __P((vm_pager_t)); @@ -150,7 +148,6 @@ vm_object_init() * * Returns a new object with the given size. */ - vm_object_t vm_object_allocate(size) vm_size_t size; @@ -550,7 +547,6 @@ vm_object_cache_trim() vm_object_cache_unlock(); } - /* * vm_object_shutdown() * @@ -562,7 +558,6 @@ vm_object_cache_trim() * a duplicate deallocation. This routine is probably full of * race conditions! */ - void vm_object_shutdown() { @@ -879,7 +874,6 @@ vm_object_copy(src_object, src_offset, size, * The new object and offset into that object * are returned in the source parameters. */ - void vm_object_shadow(object, offset, length) vm_object_t *object; /* IN/OUT */ @@ -925,7 +919,6 @@ vm_object_shadow(object, offset, length) /* * Set the specified object's pager to the specified pager. */ - void vm_object_setpager(object, pager, paging_offset, read_only) @@ -947,7 +940,6 @@ vm_object_setpager(object, pager, paging_offset, /* * vm_object_hash hashes the pager/id pair. */ - #define vm_object_hash(pager) \ (((unsigned)pager)%VM_OBJECT_HASH_COUNT) @@ -955,7 +947,6 @@ vm_object_setpager(object, pager, paging_offset, * vm_object_lookup looks in the object cache for an object with the * specified pager and paging id. */ - vm_object_t vm_object_lookup(pager) vm_pager_t pager; @@ -1059,7 +1050,6 @@ vm_object_remove(pager) * vm_object_cache_clear removes all objects from the cache. * */ - void vm_object_cache_clear() { diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 86a7a0166a87..ae7133689b44 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_object.h 7.3 (Berkeley) 4/21/91 - * $Id: vm_object.h,v 1.6 1994/01/07 22:22:26 mycroft Exp $ + * $Id: vm_object.h,v 1.7 1994/01/08 04:38:19 mycroft Exp $ * * * Copyright (c) 1987, 1990 Carnegie-Mellon University. @@ -132,27 +132,43 @@ vm_object_t kmem_object; /* * Declare procedures that operate on VM objects. */ +void vm_object_init __P((void)); +vm_object_t vm_object_allocate __P((vm_size_t)); +void vm_object_reference __P((vm_object_t)); +void vm_object_deallocate __P((vm_object_t)); +void vm_object_terminate __P((vm_object_t)); +void vm_object_page_clean + __P((vm_object_t, vm_offset_t, vm_offset_t)); +void vm_object_shutdown __P((void)); +void vm_object_pmap_copy + __P((vm_object_t, vm_offset_t, vm_offset_t)); +void vm_object_pmap_remove + __P((vm_object_t, vm_offset_t, vm_offset_t)); +void vm_object_copy + __P((vm_object_t, vm_offset_t, vm_size_t, + vm_object_t *, vm_offset_t *, boolean_t *)); +void vm_object_shadow + __P((vm_object_t *, vm_offset_t *, vm_size_t)); +void vm_object_setpager + __P((vm_object_t, vm_pager_t, vm_offset_t, boolean_t)); +vm_object_t vm_object_lookup __P((vm_pager_t)); +void vm_object_enter __P((vm_object_t, vm_pager_t)); +void vm_object_cache_clear __P((void)); +void vm_object_collapse __P((vm_object_t)); +void vm_object_page_remove + __P((vm_object_t, vm_offset_t, vm_offset_t)); +boolean_t vm_object_coalesce + __P((vm_object_t, vm_object_t, vm_offset_t, vm_offset_t, + vm_size_t, vm_size_t)); +void vm_object_print __P((vm_object_t, boolean_t)); +void _vm_object_print __P((vm_object_t, boolean_t, int (*)())); -void vm_object_init (); -void vm_object_terminate(); -vm_object_t vm_object_allocate(); -void vm_object_reference(); -void vm_object_deallocate(); -void vm_object_pmap_copy(); -void vm_object_pmap_remove(); -void vm_object_page_remove(); -void vm_object_shadow(); -void vm_object_copy(); -void vm_object_collapse(); -vm_object_t vm_object_lookup(); -void vm_object_enter(); -void vm_object_setpager(); +/* + * Functions implemented as macros + */ #define vm_object_cache(pager) pager_cache(vm_object_lookup(pager),TRUE) #define vm_object_uncache(pager) pager_cache(vm_object_lookup(pager),FALSE) -void vm_object_cache_clear(); -void vm_object_print(); - #define vm_object_lock_init(object) \ simple_lock_init(&(object)->Lock) #define vm_object_lock(object) \