summaryrefslogtreecommitdiff
path: root/vendor/github.com/etcd-io/bbolt/bolt_openbsd.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-05-21 15:54:26 -0400
committerGitHub <noreply@github.com>2019-05-21 15:54:26 -0400
commitcec56b0075eeec6a8cdfba3138dec32fdcd36b47 (patch)
tree6b129e2b8f58e0a46b8d25cd4459bb6e3c9436f7 /vendor/github.com/etcd-io/bbolt/bolt_openbsd.go
parente6277b1a2dedf8a4d80a270ddac0be4c22ed3e6d (diff)
parent1d505f6875d27dccafb777853a51045f82888f00 (diff)
downloadpodman-cec56b0075eeec6a8cdfba3138dec32fdcd36b47.tar.gz
podman-cec56b0075eeec6a8cdfba3138dec32fdcd36b47.tar.bz2
podman-cec56b0075eeec6a8cdfba3138dec32fdcd36b47.zip
Merge pull request #3168 from rhatdan/vendor
Update vendor of buildah and containers/images
Diffstat (limited to 'vendor/github.com/etcd-io/bbolt/bolt_openbsd.go')
-rw-r--r--vendor/github.com/etcd-io/bbolt/bolt_openbsd.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/etcd-io/bbolt/bolt_openbsd.go b/vendor/github.com/etcd-io/bbolt/bolt_openbsd.go
new file mode 100644
index 000000000..d7f50358e
--- /dev/null
+++ b/vendor/github.com/etcd-io/bbolt/bolt_openbsd.go
@@ -0,0 +1,27 @@
+package bbolt
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ msAsync = 1 << iota // perform asynchronous writes
+ msSync // perform synchronous writes
+ msInvalidate // invalidate cached data
+)
+
+func msync(db *DB) error {
+ _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate)
+ if errno != 0 {
+ return errno
+ }
+ return nil
+}
+
+func fdatasync(db *DB) error {
+ if db.data != nil {
+ return msync(db)
+ }
+ return db.file.Sync()
+}