Home
last modified time | relevance | path

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

/Linux-v4.19/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-v4.19/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 long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) in ksys_shmctl() argument
1146 if (cmd < 0 || shmid < 0) in ksys_shmctl()
1174 err = shmctl_stat(ns, shmid, cmd, &sem64); in ksys_shmctl()
[all …]
Dutil.h264 long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
277 long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr);
/Linux-v4.19/tools/testing/selftests/powerpc/benchmarks/
Dcontext_switch.c321 int shmid; in futex_setup() local
324 shmid = shmget(IPC_PRIVATE, getpagesize(), SHM_R | SHM_W); in futex_setup()
325 if (shmid < 0) { in futex_setup()
330 shmaddr = shmat(shmid, NULL, 0); in futex_setup()
333 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
337 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
/Linux-v4.19/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.h720 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
721 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
Dcompat.h826 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
/Linux-v4.19/arch/xtensa/kernel/
Dsyscall.c44 asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) in xtensa_shmat() argument
49 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in xtensa_shmat()
/Linux-v4.19/Documentation/sparc/
Dadi.txt180 int shmid, version;
205 if ((shmid = shmget(2, BUFFER_SIZE,
211 shmaddr = shmat(shmid, NULL, 0);
214 shmctl(shmid, IPC_RMID, NULL);
269 shmctl(shmid, IPC_RMID, NULL);
276 shmctl(shmid, IPC_RMID, NULL);
/Linux-v4.19/Documentation/ia64/
Derr_inject.txt304 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);