package
0.0.0-20230221233103-d30abd54d072
Repository: https://github.com/zeebo/rothko.git
Documentation: pkg.go.dev

# README

package system

import "github.com/zeebo/rothko/database/files/internal/system"

package system provides optimized and dangerous functions for system calls.

Usage

const (
	PROT_READ  = syscall.PROT_READ
	PROT_WRITE = syscall.PROT_WRITE
	MAP_SHARED = syscall.MAP_SHARED
	MS_SYNC    = syscall.MS_SYNC
	MS_ASYNC   = syscall.MS_ASYNC
)
var Error = errs.Class("system")

func Allocate

func Allocate(fd int, length int64) (err error)

func Close

func Close(fd uintptr) (err error)

func Mmap

func Mmap(fd int, length int, prot int, flags int) (data uintptr, err error)

func Msync

func Msync(data uintptr, length int, flags int) (err error)

func Munmap

func Munmap(data uintptr, length int) (err error)

func NextDirent

func NextDirent(buf []byte) (out_buf []byte, name []byte, ok bool)

func Open

func Open(path []byte) (fd uintptr, err error)