Documentation
¶
Overview ¶
Package shm implements System V shared memory functions (shmctl, shmget, shmat, shmdt).
This platform does not provide System V shared memory; every function returns errUnsupported so that programs depending on the package still build.
Index ¶
- Constants
- func At(shmId int, shmAddr uintptr, shmFlg int) (data []byte, err error)
- func Ctl(shmId int, cmd int, buf *IdDs) (int, error)
- func Dt(data []byte) error
- func Get(key int, size int, shmFlg int) (shmId int, err error)
- func Rm(shmId int) error
- func Size(shmId int) (int64, error)
- type IdDs
- type Perm
Constants ¶
View Source
const ( // Create key if key does not exist. IPC_CREAT = 01000 // Fail if key exists. IPC_EXCL = 02000 // Return error on wait. IPC_NOWAIT = 04000 // Private key. IPC_PRIVATE = 0 // Attach read-only access. SHM_RDONLY = 010000 // Round attach address to SHMLBA. SHM_RND = 020000 // Take-over region on attach. SHM_REMAP = 040000 // Execution access. SHM_EXEC = 0100000 // Lock segment (root only). SHM_LOCK = 1 // Unlock segment (root only). SHM_UNLOCK = 12 // Remove identifier. IPC_RMID = 0 // Set `ipc_perm` options. IPC_SET = 1 // Get `ipc_perm' options. IPC_STAT = 2 )
Constants.
Variables ¶
This section is empty.
Functions ¶
func Ctl ¶ added in v0.2.2
Ctl performs the control operation specified by cmd on the shared memory segment whose identifier is given in shmId.
Types ¶
Click to show internal directories.
Click to hide internal directories.