stshm

package
v1.6.0 Latest Latest
Warning

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

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

README

shm is a simple share memory lib. example

s, e := ShmGet(0x07ee0005, 100*1024*1024)
if s != nil {
	fmt.Println(s.Key())
	s.Detach()
	s.Delete()
}

Documentation

Overview

shm.go

Index

Constants

View Source
const (
	IPC_CREAT  = 00001000 /* create if key is nonexistent */
	IPC_EXCL   = 00002000 /* fail if key exists */
	IPC_NOWAIT = 00004000 /* return error on wait */

	IPC_RMID = 0 /* remove resource */
	IPC_SET  = 1 /* set ipc_perm options */
	IPC_STAT = 2 /* get ipc_perm options */
	IPC_INFO = 3 /* see ipcs */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Shm

type Shm interface {
	Data() []byte
	Size() uint32
	Key() uint32
	Detach() error
	Delete() error
}

func ShmGet

func ShmGet(key, size uint32) (Shm, error)

Jump to

Keyboard shortcuts

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