urcu

package
v0.0.0-...-2e1dda9 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: NIST-PD-fallback Imports: 3 Imported by: 0

README

ndn-dpdk/core/urcu

This package wraps the Userspace RCU library.

NDN-DPDK uses the QSBR flavor of RCU (liburcu-qsbr). Therefore, every read-side thread must call func (*ReadSide) Quiescent() (in Go) or rcu_quiescent_state() (in C) in its main loop to ensure progress.

Documentation

Overview

Package urcu is a thin wrapper of Userspace RCU library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Barrier

func Barrier()

Barrier declares an RCU barrier.

func Synchronize

func Synchronize()

Synchronize invokes synchronize_rcu.

Types

type ReadSide

type ReadSide struct {
	IsOnline bool
	NLocks   int
}

ReadSide represents an RCU read-side thread. Fields are exported so that they can be updated to reflect what C code did.

func NewReadSide

func NewReadSide() *ReadSide

NewReadSide registers current thread as an RCU read-side thread. If the thread is registered in C code, do not call this function, use a zero ReadSide instead.

func (*ReadSide) Close

func (*ReadSide) Close() error

Close unregisters current thread as an RCU read-side thread. If the thread is unregistered in C code, do not call this function.

func (*ReadSide) Lock

func (rs *ReadSide) Lock()

Lock obtains read-side lock.

func (*ReadSide) Offline

func (rs *ReadSide) Offline()

Offline marks current thread offline.

func (*ReadSide) Online

func (rs *ReadSide) Online()

Online marks current thread online.

func (*ReadSide) Quiescent

func (rs *ReadSide) Quiescent()

Quiescent indicates current thread is quiescent.

func (*ReadSide) Unlock

func (rs *ReadSide) Unlock()

Unlock releases read-side lock.

Jump to

Keyboard shortcuts

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