system

package
v0.0.0-...-0ce9163 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

package system

import "github.com/vivint/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)

Documentation

Overview

package system provides optimized and dangerous functions for system calls.

Index

Constants

View Source
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
)

Variables

View Source
var Error = errs.Class("system")

Functions

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)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL