/linux-6.6.21/tools/testing/selftests/mm/ |
D | hugepage-shm.c | 53 int shmid; in main() local 57 shmid = shmget(2, LENGTH, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); in main() 58 if (shmid < 0) { in main() 62 printf("shmid: 0x%x\n", shmid); in main() 64 shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); in main() 67 shmctl(shmid, IPC_RMID, NULL); in main() 90 shmctl(shmid, IPC_RMID, NULL); in main() 94 shmctl(shmid, IPC_RMID, NULL); in main()
|
D | write_to_hugetlbfs.c | 32 static int shmid; variable 53 shmctl(shmid, IPC_RMID, NULL); in sig_handler() 57 shmctl(shmid, IPC_RMID, NULL); in sig_handler() 198 shmid = shmget(key, size, in main() 200 if (shmid < 0) { in main() 201 shmid = shmget(++key, size, in main() 203 if (shmid < 0) in main() 206 printf("shmid: 0x%x, shmget key:%d\n", shmid, key); in main() 208 ptr = shmat(shmid, NULL, 0); in main() 211 shmctl(shmid, IPC_RMID, NULL); in main()
|
/linux-6.6.21/ipc/ |
D | shm.c | 996 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, in shmctl_down() argument 1006 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, in shmctl_down() 1085 static int shmctl_stat(struct ipc_namespace *ns, int shmid, in shmctl_stat() argument 1095 shp = shm_obtain_object(ns, shmid); in shmctl_stat() 1101 shp = shm_obtain_object_check(ns, shmid); in shmctl_stat() 1169 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) in shmctl_do_lock() argument 1176 shp = shm_obtain_object_check(ns, shmid); in shmctl_do_lock() 1245 static long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version) in ksys_shmctl() argument 1251 if (cmd < 0 || shmid < 0) in ksys_shmctl() 1278 err = shmctl_stat(ns, shmid, cmd, &sem64); in ksys_shmctl() [all …]
|
D | util.h | 287 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr);
|
/linux-6.6.21/tools/testing/selftests/powerpc/benchmarks/ |
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-6.6.21/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 | 727 asmlinkage long sys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 728 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 729 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); 1262 long ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
|
D | compat.h | 751 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
|
/linux-6.6.21/arch/xtensa/kernel/ |
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-6.6.21/tools/testing/selftests/powerpc/mm/ |
D | tlbie_test.c | 620 int shmid, run_time = 20 * 60; in main() local 653 shmid = shmget(shm_key, page_size, IPC_CREAT|0666); in main() 654 if (shmid < 0) { in main() 658 map1 = shmat(shmid, NULL, 0); in main() 663 map2 = shmat(shmid, NULL, 0); in main()
|
/linux-6.6.21/Documentation/arch/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-6.6.21/Documentation/arch/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);
|