1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-30 16:51:41 +00:00

Improve readability with a bunch of typedefs for the pager ops.

These can also be used for prototypes in the pagers.
This commit is contained in:
Poul-Henning Kamp 2004-11-09 13:43:20 +00:00
parent 6a33b3c60b
commit d20b2f76cc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137457

View File

@ -48,14 +48,22 @@ TAILQ_HEAD(pagerlst, vm_object);
struct bio;
typedef void pgo_init_t(void);
typedef vm_object_t pgo_alloc_t(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t);
typedef void pgo_dealloc_t(vm_object_t);
typedef int pgo_getpages_t(vm_object_t, vm_page_t *, int, int);
typedef void pgo_putpages_t(vm_object_t, vm_page_t *, int, int, int *);
typedef boolean_t pgo_haspage_t(vm_object_t, vm_pindex_t, int *, int *);
typedef void pgo_pageunswapped_t(vm_page_t);
struct pagerops {
void (*pgo_init)(void); /* Initialize pager. */
vm_object_t (*pgo_alloc)(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t); /* Allocate pager. */
void (*pgo_dealloc)(vm_object_t); /* Disassociate. */
int (*pgo_getpages)(vm_object_t, vm_page_t *, int, int); /* Get (read) page. */
void (*pgo_putpages)(vm_object_t, vm_page_t *, int, int, int *); /* Put (write) page. */
boolean_t (*pgo_haspage)(vm_object_t, vm_pindex_t, int *, int *); /* Does pager have page? */
void (*pgo_pageunswapped)(vm_page_t);
pgo_init_t *pgo_init; /* Initialize pager. */
pgo_alloc_t *pgo_alloc; /* Allocate pager. */
pgo_dealloc_t *pgo_dealloc; /* Disassociate. */
pgo_getpages_t *pgo_getpages; /* Get (read) page. */
pgo_putpages_t *pgo_putpages; /* Put (write) page. */
pgo_haspage_t *pgo_haspage; /* Does pager have page? */
pgo_pageunswapped_t *pgo_pageunswapped;
};
extern struct pagerops defaultpagerops;