Home
last modified time | relevance | path

Searched refs:shmid (Results 1 – 11 of 11) sorted by relevance

/Linux-v5.4/tools/testing/selftests/vm/
Dhugepage-shm.c57 int shmid; in main() local
61 shmid = shmget(2, LENGTH, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); in main()
62 if (shmid < 0) { in main()
66 printf("shmid: 0x%x\n", shmid); in main()
68 shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); in main()
71 shmctl(shmid, IPC_RMID, NULL); in main()
94 shmctl(shmid, IPC_RMID, NULL); in main()
98 shmctl(shmid, IPC_RMID, NULL); in main()
/Linux-v5.4/ipc/
Dshm.c891 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, in shmctl_down() argument
901 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, in shmctl_down()
980 static int shmctl_stat(struct ipc_namespace *ns, int shmid, in shmctl_stat() argument
990 shp = shm_obtain_object(ns, shmid); in shmctl_stat()
996 shp = shm_obtain_object_check(ns, shmid); in shmctl_stat()
1064 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) in shmctl_do_lock() argument
1071 shp = shm_obtain_object_check(ns, shmid); in shmctl_do_lock()
1140 static long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version) in ksys_shmctl() argument
1146 if (cmd < 0 || shmid < 0) in ksys_shmctl()
1173 err = shmctl_stat(ns, shmid, cmd, &sem64); in ksys_shmctl()
[all …]
Dutil.h286 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr);
/Linux-v5.4/tools/testing/selftests/powerpc/benchmarks/
Dcontext_switch.c317 int shmid; in futex_setup() local
320 shmid = shmget(IPC_PRIVATE, getpagesize(), SHM_R | SHM_W); in futex_setup()
321 if (shmid < 0) { in futex_setup()
326 shmaddr = shmat(shmid, NULL, 0); in futex_setup()
329 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
333 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
/Linux-v5.4/include/linux/
Dshm.h17 long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
27 static inline long do_shmat(int shmid, char __user *shmaddr, in do_shmat() argument
Dsyscalls.h792 asmlinkage long sys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
793 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
794 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
1419 long ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
Dcompat.h764 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
/Linux-v5.4/arch/xtensa/kernel/
Dsyscall.c43 asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) in xtensa_shmat() argument
48 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in xtensa_shmat()
/Linux-v5.4/tools/testing/selftests/powerpc/mm/
Dtlbie_test.c621 int shmid, run_time = 20 * 60; in main() local
654 shmid = shmget(shm_key, page_size, IPC_CREAT|0666); in main()
655 if (shmid < 0) { in main()
659 map1 = shmat(shmid, NULL, 0); in main()
664 map2 = shmat(shmid, NULL, 0); in main()
/Linux-v5.4/Documentation/sparc/
Dadi.rst188 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);
/Linux-v5.4/Documentation/ia64/
Derr_inject.rst304 int shmid;
319 shmid = shmget(key, SHM_SIZE, 0644 | IPC_CREAT);
320 if (shmid == -1) {
322 shmid = shmget(key, SHM_SIZE, 0);
323 if (shmid == -1) {
333 vbprintf("shmid=%d", shmid);
336 shmaddr = shmat(shmid, (void *)SHM_VA, 0);
352 semctl(shmid, 0, IPC_RMID);