sem

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPC_CREAT = C.IPC_CREAT
	IPC_EXCL  = C.IPC_EXCL
	IPC_RMID  = C.IPC_RMID
	SETVAL    = C.SETVAL
	GETVAL    = C.GETVAL
	SEM_A     = C.SEM_A
	SEM_R     = C.SEM_R
	SEM_UNDO  = C.SEM_UNDO
)

Variables

View Source
var ErrInvalidSem = errors.New("invalid sem")

Functions

This section is empty.

Types

type Semaphore

type Semaphore struct {
	SemID int
	// contains filtered or unexported fields
}

func SemGet

func SemGet(key int, nsems int, flags int) (*Semaphore, error)

func (*Semaphore) Destroy

func (s *Semaphore) Destroy(semNum int) error

func (*Semaphore) GetVal

func (s *Semaphore) GetVal(semNum int) (int, error)

func (*Semaphore) Post

func (s *Semaphore) Post(semNum int) error

func (*Semaphore) SetVal

func (s *Semaphore) SetVal(semNum int, val int) error

func (*Semaphore) Wait

func (s *Semaphore) Wait(semNum int) error

Jump to

Keyboard shortcuts

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