/Linux-v5.4/tools/testing/selftests/vm/ |
D | hugepage-shm.c | 57 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/ |
D | shm.c | 891 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 …]
|
D | util.h | 286 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr);
|
/Linux-v5.4/tools/testing/selftests/powerpc/benchmarks/ |
D | context_switch.c | 317 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/ |
D | shm.h | 17 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
|
D | syscalls.h | 792 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);
|
D | compat.h | 764 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
|
/Linux-v5.4/arch/xtensa/kernel/ |
D | syscall.c | 43 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/ |
D | tlbie_test.c | 621 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/ |
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);
|
/Linux-v5.4/Documentation/ia64/ |
D | err_inject.rst | 304 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);
|