Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/swap_pager.h
Show All 32 Lines | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90 | * from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90 | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _VM_SWAP_PAGER_H_ | #ifndef _VM_SWAP_PAGER_H_ | ||||
#define _VM_SWAP_PAGER_H_ 1 | #define _VM_SWAP_PAGER_H_ | ||||
typedef int32_t swblk_t; /* | #include <sys/_types.h> | ||||
* swap offset. This is the type used to | |||||
* address the "virtual swap device" and | |||||
* therefore the maximum swap space is | |||||
* 2^32 pages. | |||||
*/ | |||||
struct buf; | struct buf; | ||||
struct swdevt; | struct swdevt; | ||||
typedef void sw_strategy_t(struct buf *, struct swdevt *); | typedef void sw_strategy_t(struct buf *, struct swdevt *); | ||||
typedef void sw_close_t(struct thread *, struct swdevt *); | typedef void sw_close_t(struct thread *, struct swdevt *); | ||||
/* | /* | ||||
* Swap device table | * Swap device table | ||||
*/ | */ | ||||
struct swdevt { | struct swdevt { | ||||
int sw_flags; | int sw_flags; | ||||
int sw_nblks; | int sw_nblks; | ||||
int sw_used; | int sw_used; | ||||
dev_t sw_dev; | dev_t sw_dev; | ||||
struct vnode *sw_vp; | struct vnode *sw_vp; | ||||
void *sw_id; | void *sw_id; | ||||
swblk_t sw_first; | __daddr_t sw_first; | ||||
swblk_t sw_end; | __daddr_t sw_end; | ||||
struct blist *sw_blist; | struct blist *sw_blist; | ||||
TAILQ_ENTRY(swdevt) sw_list; | TAILQ_ENTRY(swdevt) sw_list; | ||||
sw_strategy_t *sw_strategy; | sw_strategy_t *sw_strategy; | ||||
sw_close_t *sw_close; | sw_close_t *sw_close; | ||||
}; | }; | ||||
#define SW_UNMAPPED 0x01 | #define SW_UNMAPPED 0x01 | ||||
#define SW_CLOSING 0x04 | #define SW_CLOSING 0x04 | ||||
Show All 18 Lines |