auth/vendor/go.etcd.io/bbolt/bolt_openbsd.go

17 lines
241 B
Go
Raw Permalink Normal View History

2022-06-09 17:35:23 +00:00
package bbolt
import (
"golang.org/x/sys/unix"
2022-06-09 17:35:23 +00:00
)
func msync(db *DB) error {
return unix.Msync(db.data[:db.datasz], unix.MS_INVALIDATE)
2022-06-09 17:35:23 +00:00
}
func fdatasync(db *DB) error {
if db.data != nil {
return msync(db)
}
return db.file.Sync()
}