summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/block.i
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/include/block.i')
-rw-r--r--src/third_party/wiredtiger/src/include/block.i39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/include/block.i b/src/third_party/wiredtiger/src/include/block.i
new file mode 100644
index 00000000000..3b9183a19fa
--- /dev/null
+++ b/src/third_party/wiredtiger/src/include/block.i
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 2014-2019 MongoDB, Inc.
+ * Copyright (c) 2008-2014 WiredTiger, Inc.
+ * All rights reserved.
+ *
+ * See the file LICENSE for redistribution information.
+ */
+
+/*
+ * WiredTiger's block manager interface.
+ */
+
+/*
+ * __wt_extlist_write_pair --
+ * Write an extent list pair.
+ */
+static inline int
+__wt_extlist_write_pair(uint8_t **p, wt_off_t off, wt_off_t size)
+{
+ WT_RET(__wt_vpack_uint(p, 0, (uint64_t)(off)));
+ WT_RET(__wt_vpack_uint(p, 0, (uint64_t)(size)));
+ return (0);
+}
+
+/*
+ * __wt_extlist_read_pair --
+ * Read an extent list pair.
+ */
+static inline int
+__wt_extlist_read_pair(const uint8_t **p, wt_off_t *offp, wt_off_t *sizep)
+{
+ uint64_t v;
+
+ WT_RET(__wt_vunpack_uint(p, 0, &v));
+ *offp = (wt_off_t)v;
+ WT_RET(__wt_vunpack_uint(p, 0, &v));
+ *sizep = (wt_off_t)v;
+ return (0);
+}