BSD syscall#263
svc · unix #263
shmctl
Performs control operations (stat, set, remove) on a System V shared-memory segment.
Prototype
int shmctl(int shmid, int cmd, struct shmid_ds *buf);Returns: int
Arguments
| Name | Type | Dir | Description |
|---|---|---|---|
| shmid | int | - | |
| cmd | int | - | |
| buf | struct shmid_ds | - |
Version history
| XNU tag | macOS | # |
|---|---|---|
| xnu-1456.1.26 | macOS 10.6 Snow Leopard | 263 |
| xnu-1486.2.11 | — | 263 |
| xnu-1504.15.3 | — | 263 |
| xnu-1504.3.12 | — | 263 |
| xnu-1504.7.4 | — | 263 |
| xnu-1504.9.17 | — | 263 |
| xnu-1504.9.26 | — | 263 |
| xnu-1504.9.37 | — | 263 |
Notes
Supports IPC_STAT, IPC_SET and IPC_RMID. IPC_RMID schedules the segment for destruction once the last attach is released — existing attachments keep working. macOS does not implement the Linux extensions SHM_LOCK / SHM_UNLOCK.
Related APIs
shmatshmdtshmgetipcsipcrm