ring

package
v0.0.0-...-b957d1f Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	Data []byte

	ReaderPos *uint32
	WriterPos *uint32
}

Buffer provides a memory-layout agnostic and safe interface for writing to or reading from a shared Xen ring buffer.

func (*Buffer) Read

func (buf *Buffer) Read(data []byte) (int, error)

Read reads bytes from buf into data, updates the position, and returns the number of bytes read.

func (*Buffer) Write

func (buf *Buffer) Write(data []byte) (int, error)

Write writes bytes from data info buf, updates the position, and returns the number of bytes written.

Jump to

Keyboard shortcuts

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