jrnl

package
v0.0.0-...-26f42d8 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Companion_Addr_ = CompanionStruct_Addr_{}

Functions

func DiskSize

func DiskSize(d *Disk) uint64

Types

type Addr

type Addr struct {
	// note this is not exactly what Dafny would emit: it would put an interface
	// here which in practice is always the Addr_Addr struct
	Addr_Addr
}

func (Addr) Dtor_blkno

func (_this Addr) Dtor_blkno() uint64

func (Addr) Dtor_off

func (_this Addr) Dtor_off() uint64

type Addr_Addr

type Addr_Addr struct {
	Blkno Blkno
	Off   uint64
}

type Allocator

type Allocator struct {
	// contains filtered or unexported fields
}

func NewAllocator

func NewAllocator(max uint64) *Allocator

func (*Allocator) Alloc

func (a *Allocator) Alloc() uint64

func (*Allocator) Free

func (a *Allocator) Free(x uint64)

func (*Allocator) MarkUsed

func (a *Allocator) MarkUsed(x uint64)

func (*Allocator) NumFree

func (a *Allocator) NumFree() uint64

type Blkno

type Blkno = uint64

type CompanionStruct_Addr_

type CompanionStruct_Addr_ struct{}

func (CompanionStruct_Addr_) Create_Addr_

func (CompanionStruct_Addr_) Create_Addr_(blkno Blkno, off uint64) Addr

type Disk

type Disk = disk.Disk

type Jrnl

type Jrnl struct {
	// contains filtered or unexported fields
}

func NewJrnl

func NewJrnl(d *Disk) *Jrnl

func (*Jrnl) Begin

func (jrnl *Jrnl) Begin() *Txn

func (*Jrnl) Flush

func (jrnl *Jrnl) Flush()

type Txn

type Txn struct {
	// contains filtered or unexported fields
}

func (*Txn) Abort

func (txn *Txn) Abort()

func (*Txn) Commit

func (txn *Txn) Commit(wait bool) bool

func (*Txn) NDirty

func (txn *Txn) NDirty() uint64

func (*Txn) Read

func (txn *Txn) Read(a Addr, sz uint64) *bytes.Bytes

func (*Txn) ReadBit

func (txn *Txn) ReadBit(a Addr) bool

func (*Txn) Write

func (txn *Txn) Write(a Addr, bs *bytes.Bytes)

func (*Txn) WriteBit

func (txn *Txn) WriteBit(a Addr, b bool)

Jump to

Keyboard shortcuts

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