shm

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: BSD-3-Clause Imports: 2 Imported by: 14

README

shm

Status Go Reference Go Report Card

shm implements System V shared memory functions (shmctl, shmget, shmat, shmdt) in pure Go (except solaris, see #24357).

Installation

go get -u github.com/gen2brain/shm

More

For System V Message Queue IPC (i.e. msgctl, msgget, msgrcv, msgsnd) see ipc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdDs

type IdDs struct {
	// Operation permission struct.
	Perm Perm
	// Last attach time.
	Atime int64
	// Last detach time.
	Dtime int64
	// Last change time.
	Ctime int64
	// Size of segment in bytes.
	SegSz uint64
	// Pid of creator.
	Cpid int32
	// Pid of last shmat/shmdt.
	Lpid int32
	// Number of current attaches.
	Nattch uint64
	// Reserved.
	GlibcReserved5 uint64
	// Reserved.
	GlibcReserved6 uint64
}

IdDs describes shared memory segment.

type Perm

type Perm struct {
	// Key.
	Key int32
	// Owner's user ID.
	Uid uint32
	// Owner's group ID.
	Gid uint32
	// Creator's user ID.
	Cuid uint32
	// Creator's group ID.
	Cgid uint32
	// Read/write permission.
	Mode uint32
	// Sequence number.
	Seq uint32
	// Padding.
	Pad1 uint32
	// Reserved.
	GlibcReserved1 uint64
	// Reserved.
	GlibcReserved2 uint64
}

Perm is used to pass permission information to IPC operations.

Jump to

Keyboard shortcuts

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