summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/swap_pager.h')
-rw-r--r--sys/vm/swap_pager.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h
index a254cc7..c3366e8 100644
--- a/sys/vm/swap_pager.h
+++ b/sys/vm/swap_pager.h
@@ -38,6 +38,38 @@
#ifndef _VM_SWAP_PAGER_H_
#define _VM_SWAP_PAGER_H_ 1
+typedef int32_t swblk_t; /*
+ * 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 swdevt;
+typedef void sw_strategy_t(struct buf *, struct swdevt *);
+typedef void sw_close_t(struct thread *, struct swdevt *);
+
+/*
+ * Swap device table
+ */
+struct swdevt {
+ int sw_flags;
+ int sw_nblks;
+ int sw_used;
+ dev_t sw_dev;
+ struct vnode *sw_vp;
+ void *sw_id;
+ swblk_t sw_first;
+ swblk_t sw_end;
+ struct blist *sw_blist;
+ TAILQ_ENTRY(swdevt) sw_list;
+ sw_strategy_t *sw_strategy;
+ sw_close_t *sw_close;
+};
+
+#define SW_CLOSING 0x04
+
#ifdef _KERNEL
extern int swap_pager_full;
OpenPOWER on IntegriCloud