| /linux/tools/testing/selftests/mm/ |
| H A D | hugepage-shm.c | 37 int shmid; in main() local 41 shmid = shmget(2, LENGTH, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); in main() 42 if (shmid < 0) { in main() 46 printf("shmid: 0x%x\n", shmid); in main() 48 shmaddr = shmat(shmid, NULL, 0); in main() 51 shmctl(shmid, IPC_RMID, NULL); in main() 74 shmctl(shmid, IPC_RMID, NULL); in main() 78 shmctl(shmid, IPC_RMID, NULL); in main()
|
| H A D | pagemap_ioctl.c | 162 void *gethugetlb_mem(int size, int *shmid) in gethugetlb_mem() argument 166 if (shmid) { in gethugetlb_mem() 167 *shmid = shmget(2, size, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); in gethugetlb_mem() 168 if (*shmid < 0) in gethugetlb_mem() 171 mem = shmat(*shmid, 0, 0); in gethugetlb_mem() 173 shmctl(*shmid, IPC_RMID, NULL); in gethugetlb_mem() 1546 int shmid, buf_size, fd, i, ret; in main() local 1610 mem = gethugetlb_mem(mem_size, &shmid); in main() 1618 shmctl(shmid, IPC_RMID, NULL); in main() 1649 shmctl(shmid, IPC_RMID, NULL); in main()
|
| /linux/ipc/ |
| H A D | shm.c | 993 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, in shmctl_down() argument 1003 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, in shmctl_down() 1082 static int shmctl_stat(struct ipc_namespace *ns, int shmid, in shmctl_stat() argument 1092 shp = shm_obtain_object(ns, shmid); in shmctl_stat() 1098 shp = shm_obtain_object_check(ns, shmid); in shmctl_stat() 1166 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) in shmctl_do_lock() argument 1173 shp = shm_obtain_object_check(ns, shmid); in shmctl_do_lock() 1242 static long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version) in ksys_shmctl() argument 1248 if (cmd < 0 || shmid < 0) in ksys_shmctl() 1275 err = shmctl_stat(ns, shmid, cmd, &sem64); in ksys_shmctl() [all …]
|
| H A D | util.h | 288 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr);
|
| /linux/tools/testing/selftests/powerpc/benchmarks/ |
| H A D | context_switch.c | 328 int shmid; in futex_setup() local 331 shmid = shmget(IPC_PRIVATE, getpagesize(), SHM_R | SHM_W); in futex_setup() 332 if (shmid < 0) { in futex_setup() 337 shmaddr = shmat(shmid, NULL, 0); in futex_setup() 340 shmctl(shmid, IPC_RMID, NULL); in futex_setup() 344 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
|
| /linux/include/linux/ |
| H A D | shm.h | 17 long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr, 26 static inline long do_shmat(int shmid, char __user *shmaddr, in do_shmat() argument
|
| H A D | syscalls.h | 769 asmlinkage long sys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 770 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 771 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); 1324 long ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
|
| /linux/arch/xtensa/kernel/ |
| H A D | syscall.c | 39 asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) in xtensa_shmat() argument 44 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in xtensa_shmat()
|
| /linux/Documentation/arch/sparc/ |
| H A D | adi.rst | 188 int shmid, version; 213 if ((shmid = shmget(2, BUFFER_SIZE, 219 shmaddr = shmat(shmid, NULL, 0); 222 shmctl(shmid, IPC_RMID, NULL); 277 shmctl(shmid, IPC_RMID, NULL); 284 shmctl(shmid, IPC_RMID, NULL);
|