Fix argument passing to the "freeer" routine. Added some prototypes. (bde)
Moved extern declaration of swap_pager_full into swap_pager.h and out of the various files that reference it. (davidg) Submitted by: bde & davidg
This commit is contained in:
parent
3dff9b4169
commit
cd41fc123e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11317
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90
|
||||
* $Id: swap_pager.h,v 1.8 1995/07/16 13:28:35 davidg Exp $
|
||||
* $Id: swap_pager.h,v 1.9 1995/08/16 16:14:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -65,6 +65,7 @@ typedef struct swblock *sw_blk_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct pagerlst swap_pager_un_object_list;
|
||||
extern int swap_pager_full;
|
||||
|
||||
void swap_pager_init __P((void));
|
||||
vm_object_t swap_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_offset_t));
|
||||
|
@ -66,7 +66,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_fault.c,v 1.31 1995/09/14 13:42:52 dyson Exp $
|
||||
* $Id: vm_fault.c,v 1.32 1995/09/24 19:47:58 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -87,13 +87,13 @@
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_pager.h>
|
||||
#include <vm/vnode_pager.h>
|
||||
#include <vm/swap_pager.h>
|
||||
|
||||
int vm_fault_additional_pages __P((vm_page_t, int, int, vm_page_t *, int *));
|
||||
|
||||
#define VM_FAULT_READ_AHEAD 4
|
||||
#define VM_FAULT_READ_BEHIND 3
|
||||
#define VM_FAULT_READ (VM_FAULT_READ_AHEAD+VM_FAULT_READ_BEHIND+1)
|
||||
extern int swap_pager_full;
|
||||
|
||||
/*
|
||||
* vm_fault:
|
||||
|
@ -65,7 +65,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_pageout.c,v 1.55 1995/09/09 18:10:37 davidg Exp $
|
||||
* $Id: vm_pageout.c,v 1.56 1995/10/06 09:42:11 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -124,7 +124,6 @@ extern int npendingio;
|
||||
int vm_pageout_req_swapout; /* XXX */
|
||||
int vm_daemon_needed;
|
||||
extern int nswiodone;
|
||||
extern int swap_pager_full;
|
||||
extern int vm_swap_size;
|
||||
extern int vfs_update_wakeup;
|
||||
|
||||
@ -137,6 +136,12 @@ int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT;
|
||||
|
||||
int vm_page_max_wired; /* XXX max # of wired pages system-wide */
|
||||
|
||||
typedef int freeer_fcn_t __P((vm_map_t, vm_object_t, int, int));
|
||||
static void vm_pageout_map_deactivate_pages __P((vm_map_t, vm_map_entry_t,
|
||||
int *, freeer_fcn_t *));
|
||||
static freeer_fcn_t vm_pageout_object_deactivate_pages;
|
||||
static void vm_req_vmdaemon __P((void));
|
||||
|
||||
/*
|
||||
* vm_pageout_clean:
|
||||
*
|
||||
@ -358,7 +363,7 @@ vm_pageout_clean(m, sync)
|
||||
*
|
||||
* The object and map must be locked.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
vm_pageout_object_deactivate_pages(map, object, count, map_remove_only)
|
||||
vm_map_t map;
|
||||
vm_object_t object;
|
||||
@ -466,12 +471,12 @@ vm_pageout_object_deactivate_pages(map, object, count, map_remove_only)
|
||||
* that is really hard to do.
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
vm_pageout_map_deactivate_pages(map, entry, count, freeer)
|
||||
vm_map_t map;
|
||||
vm_map_entry_t entry;
|
||||
int *count;
|
||||
int (*freeer) (vm_map_t, vm_object_t, int);
|
||||
freeer_fcn_t *freeer;
|
||||
{
|
||||
vm_map_t tmpm;
|
||||
vm_map_entry_t tmpe;
|
||||
@ -487,25 +492,25 @@ vm_pageout_map_deactivate_pages(map, entry, count, freeer)
|
||||
if (entry == 0) {
|
||||
tmpe = map->header.next;
|
||||
while (tmpe != &map->header && *count > 0) {
|
||||
vm_pageout_map_deactivate_pages(map, tmpe, count, freeer, 0);
|
||||
vm_pageout_map_deactivate_pages(map, tmpe, count, freeer);
|
||||
tmpe = tmpe->next;
|
||||
};
|
||||
} else if (entry->is_sub_map || entry->is_a_map) {
|
||||
tmpm = entry->object.share_map;
|
||||
tmpe = tmpm->header.next;
|
||||
while (tmpe != &tmpm->header && *count > 0) {
|
||||
vm_pageout_map_deactivate_pages(tmpm, tmpe, count, freeer, 0);
|
||||
vm_pageout_map_deactivate_pages(tmpm, tmpe, count, freeer);
|
||||
tmpe = tmpe->next;
|
||||
};
|
||||
} else if ((obj = entry->object.vm_object) != 0) {
|
||||
*count -= (*freeer) (map, obj, *count);
|
||||
*count -= (*freeer) (map, obj, *count, TRUE);
|
||||
}
|
||||
lock_read_done(&map->lock);
|
||||
vm_map_deallocate(map);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
vm_req_vmdaemon()
|
||||
{
|
||||
static int lastrun = 0;
|
||||
|
@ -38,7 +38,7 @@
|
||||
* from: Utah $Hdr: vm_unix.c 1.1 89/11/07$
|
||||
*
|
||||
* @(#)vm_unix.c 8.1 (Berkeley) 6/11/93
|
||||
* $Id: vm_unix.c,v 1.4 1995/01/09 16:05:59 davidg Exp $
|
||||
* $Id: vm_unix.c,v 1.5 1995/02/20 17:36:36 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -50,8 +50,7 @@
|
||||
#include <sys/resourcevar.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
||||
extern int swap_pager_full;
|
||||
#include <vm/swap_pager.h>
|
||||
|
||||
struct obreak_args {
|
||||
char *nsiz;
|
||||
|
Loading…
Reference in New Issue
Block a user