mirror of
https://github.com/mjl-/mox.git
synced 2024-12-28 01:13:47 +03:00
16 lines
241 B
Go
16 lines
241 B
Go
package bbolt
|
|
|
|
import (
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func msync(db *DB) error {
|
|
return unix.Msync(db.data[:db.datasz], unix.MS_INVALIDATE)
|
|
}
|
|
|
|
func fdatasync(db *DB) error {
|
|
if db.data != nil {
|
|
return msync(db)
|
|
}
|
|
return db.file.Sync()
|
|
}
|