Completed function declarations and/or added prototypes.
Staticized some functions. __purified some functions. Some functions were bogusly declared as returning `const'. This hasn't done anything since gcc-2.5. For later versions of gcc, the equivalent is __attribute__((const)) at the end of function declarations.
This commit is contained in:
parent
57a4e3fa8a
commit
cac597e4c0
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)device_pager.c 8.1 (Berkeley) 6/11/93
|
||||
* $Id: device_pager.c,v 1.12 1995/07/13 08:48:10 davidg Exp $
|
||||
* $Id: device_pager.c,v 1.13 1995/11/06 00:36:19 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -85,7 +85,7 @@ dev_pager_alloc(handle, size, prot, foff)
|
||||
vm_offset_t foff;
|
||||
{
|
||||
dev_t dev;
|
||||
int (*mapfunc) ();
|
||||
d_mmap_t *mapfunc;
|
||||
vm_object_t object;
|
||||
unsigned int npages, off;
|
||||
|
||||
@ -179,7 +179,8 @@ dev_pager_getpages(object, m, count, reqpage)
|
||||
vm_page_t page;
|
||||
dev_t dev;
|
||||
int i, s;
|
||||
int (*mapfunc) (), prot;
|
||||
d_mmap_t *mapfunc;
|
||||
int prot;
|
||||
|
||||
dev = (dev_t) (u_long) object->handle;
|
||||
offset = m[reqpage]->offset + object->paging_offset;
|
||||
|
@ -39,7 +39,7 @@
|
||||
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
|
||||
*
|
||||
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
|
||||
* $Id: swap_pager.c,v 1.50 1995/11/16 09:51:19 bde Exp $
|
||||
* $Id: swap_pager.c,v 1.51 1995/11/20 12:19:58 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -136,10 +136,32 @@ struct pagerops swappagerops = {
|
||||
};
|
||||
|
||||
static int npendingio = NPENDINGIO;
|
||||
static void swap_pager_finish();
|
||||
int dmmin, dmmax;
|
||||
|
||||
static __pure int
|
||||
swap_pager_block_index __P((vm_offset_t offset)) __pure2;
|
||||
static __pure int
|
||||
swap_pager_block_offset __P((vm_offset_t offset)) __pure2;
|
||||
static int *swap_pager_diskaddr __P((vm_object_t object,
|
||||
vm_offset_t offset, int *valid));
|
||||
static void swap_pager_finish __P((swp_clean_t spc));
|
||||
static void swap_pager_freepage __P((vm_page_t m));
|
||||
static void swap_pager_free_swap __P((vm_object_t object));
|
||||
static void swap_pager_freeswapspace __P((vm_object_t object,
|
||||
unsigned int from,
|
||||
unsigned int to));
|
||||
static int swap_pager_getswapspace __P((vm_object_t object,
|
||||
unsigned int amount,
|
||||
unsigned int *rtval));
|
||||
static void swap_pager_iodone __P((struct buf *));
|
||||
static void swap_pager_iodone1 __P((struct buf *bp));
|
||||
static int swap_pager_ready __P((void));
|
||||
static void swap_pager_reclaim __P((void));
|
||||
static void swap_pager_ridpages __P((vm_page_t *m, int count,
|
||||
int reqpage));
|
||||
static void swap_pager_setvalid __P((vm_object_t object,
|
||||
vm_offset_t offset, int valid));
|
||||
static void swapsizecheck __P((void));
|
||||
|
||||
static inline void
|
||||
swapsizecheck()
|
||||
@ -283,7 +305,7 @@ swap_pager_alloc(handle, size, prot, offset)
|
||||
* if the block has been written
|
||||
*/
|
||||
|
||||
inline static int *
|
||||
static inline int *
|
||||
swap_pager_diskaddr(object, offset, valid)
|
||||
vm_object_t object;
|
||||
vm_offset_t offset;
|
||||
@ -687,16 +709,14 @@ swap_pager_dealloc(object)
|
||||
object->un_pager.swp.swp_blocks = NULL;
|
||||
}
|
||||
|
||||
static inline int
|
||||
const
|
||||
static inline __pure int
|
||||
swap_pager_block_index(offset)
|
||||
vm_offset_t offset;
|
||||
{
|
||||
return (offset / (SWB_NPAGES * PAGE_SIZE));
|
||||
}
|
||||
|
||||
static inline int
|
||||
const
|
||||
static inline __pure int
|
||||
swap_pager_block_offset(offset)
|
||||
vm_offset_t offset;
|
||||
{
|
||||
@ -1603,7 +1623,7 @@ swap_pager_iodone(bp)
|
||||
/*
|
||||
* return true if any swap control structures can be allocated
|
||||
*/
|
||||
int
|
||||
static int
|
||||
swap_pager_ready()
|
||||
{
|
||||
if (swap_pager_free.tqh_first)
|
||||
|
@ -38,7 +38,7 @@
|
||||
* from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
|
||||
*
|
||||
* @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
|
||||
* $Id: vm_mmap.c,v 1.28 1995/10/23 03:49:37 dyson Exp $
|
||||
* $Id: vm_mmap.c,v 1.29 1995/11/12 06:43:24 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -63,7 +63,9 @@
|
||||
#include <vm/vm_pageout.h>
|
||||
#include <vm/vm_prot.h>
|
||||
|
||||
void pmap_object_init_pt();
|
||||
extern void pmap_object_init_pt __P((pmap_t pmap, vm_offset_t addr,
|
||||
vm_object_t object, vm_offset_t offset,
|
||||
vm_offset_t size));
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct sbrk_args {
|
||||
|
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_object.c,v 1.55 1995/11/05 20:46:00 dyson Exp $
|
||||
* $Id: vm_object.c,v 1.56 1995/11/20 12:19:41 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -83,8 +83,20 @@
|
||||
#include <vm/swap_pager.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
static void _vm_object_allocate(objtype_t, vm_size_t, vm_object_t);
|
||||
#ifdef DDB
|
||||
extern void vm_object_check __P((void));
|
||||
#endif
|
||||
|
||||
static void _vm_object_allocate __P((objtype_t, vm_size_t, vm_object_t));
|
||||
#ifdef DDB
|
||||
static int _vm_object_in_map __P((vm_map_t map, vm_object_t object,
|
||||
vm_map_entry_t entry));
|
||||
static int vm_object_in_map __P((vm_object_t object));
|
||||
#endif
|
||||
static vm_page_t
|
||||
vm_object_page_lookup __P((vm_object_t object,
|
||||
vm_offset_t offset));
|
||||
static void vm_object_qcollapse __P((vm_object_t object));
|
||||
|
||||
/*
|
||||
* Virtual memory objects maintain the actual data
|
||||
@ -1211,7 +1223,7 @@ vm_object_coalesce(prev_object, next_object,
|
||||
* returns page after looking up in shadow chain
|
||||
*/
|
||||
|
||||
vm_page_t
|
||||
static vm_page_t
|
||||
vm_object_page_lookup(object, offset)
|
||||
vm_object_t object;
|
||||
vm_offset_t offset;
|
||||
@ -1229,7 +1241,7 @@ vm_object_page_lookup(object, offset)
|
||||
|
||||
#ifdef DDB
|
||||
|
||||
int
|
||||
static int
|
||||
_vm_object_in_map(map, object, entry)
|
||||
vm_map_t map;
|
||||
vm_object_t object;
|
||||
@ -1271,7 +1283,7 @@ _vm_object_in_map(map, object, entry)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
vm_object_in_map( object)
|
||||
vm_object_t object;
|
||||
{
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: vm_page.c,v 1.37 1995/10/23 05:35:46 dyson Exp $
|
||||
* $Id: vm_page.c,v 1.38 1995/11/20 12:19:34 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -78,6 +78,10 @@
|
||||
#include <vm/vm_map.h>
|
||||
#include <vm/vm_pageout.h>
|
||||
|
||||
#ifdef DDB
|
||||
extern void print_page_info __P((void));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Associated with page of user-allocatable memory is a
|
||||
* page structure.
|
||||
@ -114,7 +118,10 @@ static u_short vm_page_dev_bsize_chunks[] = {
|
||||
0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff
|
||||
};
|
||||
|
||||
static void vm_page_unqueue __P((vm_page_t ));
|
||||
static inline __pure int
|
||||
vm_page_hash __P((vm_object_t object, vm_offset_t offset))
|
||||
__pure2;
|
||||
static void vm_page_unqueue __P((vm_page_t ));
|
||||
|
||||
/*
|
||||
* vm_set_page_size:
|
||||
@ -294,7 +301,6 @@ vm_page_startup(starta, enda, vaddr)
|
||||
vm_page_array = (vm_page_t) vaddr;
|
||||
mapped = vaddr;
|
||||
|
||||
|
||||
/*
|
||||
* Validate these addresses.
|
||||
*/
|
||||
@ -340,7 +346,7 @@ vm_page_startup(starta, enda, vaddr)
|
||||
*
|
||||
* NOTE: This macro depends on vm_page_bucket_count being a power of 2.
|
||||
*/
|
||||
inline const int
|
||||
static inline __pure int
|
||||
vm_page_hash(vm_object_t object, vm_offset_t offset)
|
||||
{
|
||||
return ((unsigned) object + (offset >> PAGE_SHIFT)) & vm_page_hash_mask;
|
||||
|
Loading…
x
Reference in New Issue
Block a user