Home
last modified time | relevance | path

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

/linux-6.6.21/tools/testing/selftests/mm/
Dhugepage-shm.c53 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()
Dwrite_to_hugetlbfs.c32 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/
Dshm.c996 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 …]
Dutil.h287 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr);
/linux-6.6.21/tools/testing/selftests/powerpc/benchmarks/
Dcontext_switch.c328 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/
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.h727 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);
Dcompat.h751 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
/linux-6.6.21/arch/xtensa/kernel/
Dsyscall.c39 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/
Dtlbie_test.c620 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/
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-6.6.21/Documentation/arch/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);