Lines Matching refs:shmid
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()
1290 return shmctl_down(ns, shmid, cmd, &sem64); in ksys_shmctl()
1293 return shmctl_do_lock(ns, shmid, cmd); in ksys_shmctl()
1299 SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) in SYSCALL_DEFINE3() argument
1301 return ksys_shmctl(shmid, cmd, buf, IPC_64); in SYSCALL_DEFINE3()
1305 long ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) in ksys_old_shmctl() argument
1309 return ksys_shmctl(shmid, cmd, buf, version); in ksys_old_shmctl()
1312 SYSCALL_DEFINE3(old_shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) in SYSCALL_DEFINE3() argument
1314 return ksys_old_shmctl(shmid, cmd, buf); in SYSCALL_DEFINE3()
1440 static long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version) in compat_ksys_shmctl() argument
1448 if (cmd < 0 || shmid < 0) in compat_ksys_shmctl()
1473 err = shmctl_stat(ns, shmid, cmd, &sem64); in compat_ksys_shmctl()
1485 return shmctl_down(ns, shmid, cmd, &sem64); in compat_ksys_shmctl()
1488 return shmctl_do_lock(ns, shmid, cmd); in compat_ksys_shmctl()
1495 COMPAT_SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, void __user *, uptr) in COMPAT_SYSCALL_DEFINE3() argument
1497 return compat_ksys_shmctl(shmid, cmd, uptr, IPC_64); in COMPAT_SYSCALL_DEFINE3()
1501 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr) in compat_ksys_old_shmctl() argument
1505 return compat_ksys_shmctl(shmid, cmd, uptr, version); in compat_ksys_old_shmctl()
1508 COMPAT_SYSCALL_DEFINE3(old_shmctl, int, shmid, int, cmd, void __user *, uptr) in COMPAT_SYSCALL_DEFINE3() argument
1510 return compat_ksys_old_shmctl(shmid, cmd, uptr); in COMPAT_SYSCALL_DEFINE3()
1522 long do_shmat(int shmid, char __user *shmaddr, int shmflg, in do_shmat() argument
1539 if (shmid < 0) in do_shmat()
1585 shp = shm_obtain_object_check(ns, shmid); in do_shmat()
1680 shp = shm_lock(ns, shmid); in do_shmat()
1696 SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) in SYSCALL_DEFINE3() argument
1701 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in SYSCALL_DEFINE3()
1714 COMPAT_SYSCALL_DEFINE3(shmat, int, shmid, compat_uptr_t, shmaddr, int, shmflg) in COMPAT_SYSCALL_DEFINE3() argument
1719 err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA); in COMPAT_SYSCALL_DEFINE3()