2014-01-30 21:56:34 +00:00
|
|
|
package bolt
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
type _syscall interface {
|
|
|
|
Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error)
|
2014-02-11 19:16:12 +00:00
|
|
|
Munmap([]byte) error
|
2014-01-30 21:56:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type syssyscall struct{}
|
|
|
|
|
|
|
|
func (o *syssyscall) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
|
|
|
|
// err = (EACCES, EBADF, EINVAL, ENODEV, ENOMEM, ENXIO, EOVERFLOW)
|
|
|
|
return syscall.Mmap(fd, offset, length, prot, flags)
|
|
|
|
}
|
2014-02-11 19:16:12 +00:00
|
|
|
|
|
|
|
func (o *syssyscall) Munmap(b []byte) error {
|
|
|
|
return syscall.Munmap(b)
|
|
|
|
}
|