1
0
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-01-15 18:06:27 +03:00
mox/vendor/go.etcd.io/bbolt/bolt_openbsd.go

17 lines
241 B
Go
Raw Normal View History

2023-01-30 16:27:06 +03:00
package bbolt
import (
"golang.org/x/sys/unix"
2023-01-30 16:27:06 +03:00
)
func msync(db *DB) error {
return unix.Msync(db.data[:db.datasz], unix.MS_INVALIDATE)
2023-01-30 16:27:06 +03:00
}
func fdatasync(db *DB) error {
if db.data != nil {
return msync(db)
}
return db.file.Sync()
}