Lines Matching refs:uap
367 sys_shmdt(struct thread *td, struct shmdt_args *uap) in sys_shmdt() argument
372 error = kern_shmdt_locked(td, uap->shmaddr); in sys_shmdt()
486 sys_shmat(struct thread *td, struct shmat_args *uap) in sys_shmat() argument
489 return (kern_shmat(td, uap->shmid, uap->shmaddr, uap->shmflg)); in sys_shmat()
615 sys_shmctl(struct thread *td, struct shmctl_args *uap) in sys_shmctl() argument
626 if (uap->cmd == IPC_INFO || uap->cmd == SHM_INFO || in sys_shmctl()
627 uap->cmd == SHM_STAT) in sys_shmctl()
631 if (uap->cmd == IPC_SET) { in sys_shmctl()
632 if ((error = copyin(uap->buf, &buf, sizeof(struct shmid_ds)))) in sys_shmctl()
636 error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&buf, &bufsz); in sys_shmctl()
641 switch (uap->cmd) { in sys_shmctl()
643 error = copyout(&buf, uap->buf, bufsz); in sys_shmctl()
781 sys_shmget(struct thread *td, struct shmget_args *uap) in sys_shmget() argument
788 mode = uap->shmflg & ACCESSPERMS; in sys_shmget()
790 if (uap->key == IPC_PRIVATE) { in sys_shmget()
791 error = shmget_allocate_segment(td, uap->key, uap->size, mode); in sys_shmget()
794 uap->key); in sys_shmget()
796 error = shmget_existing(td, uap->size, uap->shmflg, in sys_shmget()
798 else if ((uap->shmflg & IPC_CREAT) == 0) in sys_shmget()
801 error = shmget_allocate_segment(td, uap->key, in sys_shmget()
802 uap->size, mode); in sys_shmget()
1355 oshmctl(struct thread *td, struct oshmctl_args *uap) in oshmctl() argument
1366 if (uap->cmd != IPC_STAT) { in oshmctl()
1368 (struct freebsd7_shmctl_args *)uap)); in oshmctl()
1371 shmseg = shm_find_segment(rpr, uap->shmid, true); in oshmctl()
1382 error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, uap->cmd); in oshmctl()
1398 return (copyout(&outbuf, uap->ubuf, sizeof(outbuf))); in oshmctl()
1421 sys_shmsys(struct thread *td, struct shmsys_args *uap) in sys_shmsys() argument
1424 AUDIT_ARG_SVIPC_WHICH(uap->which); in sys_shmsys()
1425 if (uap->which < 0 || uap->which >= nitems(shmcalls)) in sys_shmsys()
1427 return ((*shmcalls[uap->which])(td, &uap->a2)); in sys_shmsys()
1435 freebsd32_shmsys(struct thread *td, struct freebsd32_shmsys_args *uap) in freebsd32_shmsys() argument
1440 AUDIT_ARG_SVIPC_WHICH(uap->which); in freebsd32_shmsys()
1441 switch (uap->which) { in freebsd32_shmsys()
1445 ap.shmid = uap->a2; in freebsd32_shmsys()
1446 ap.shmaddr = PTRIN(uap->a3); in freebsd32_shmsys()
1447 ap.shmflg = uap->a4; in freebsd32_shmsys()
1453 ap.shmaddr = PTRIN(uap->a2); in freebsd32_shmsys()
1459 ap.key = uap->a2; in freebsd32_shmsys()
1460 ap.size = uap->a3; in freebsd32_shmsys()
1461 ap.shmflg = uap->a4; in freebsd32_shmsys()
1467 ap.shmid = uap->a2; in freebsd32_shmsys()
1468 ap.cmd = uap->a3; in freebsd32_shmsys()
1469 ap.buf = PTRIN(uap->a4); in freebsd32_shmsys()
1485 struct freebsd7_freebsd32_shmctl_args *uap) in freebsd7_freebsd32_shmctl() argument
1500 if (uap->cmd == IPC_SET) { in freebsd7_freebsd32_shmctl()
1501 if ((error = copyin(uap->buf, &u32.shmid_ds32, in freebsd7_freebsd32_shmctl()
1515 error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&u, &sz); in freebsd7_freebsd32_shmctl()
1520 switch (uap->cmd) { in freebsd7_freebsd32_shmctl()
1527 error = copyout(&u32.shminfo32, uap->buf, in freebsd7_freebsd32_shmctl()
1537 error = copyout(&u32.shm_info32, uap->buf, in freebsd7_freebsd32_shmctl()
1556 error = copyout(&u32.shmid_ds32, uap->buf, in freebsd7_freebsd32_shmctl()
1571 freebsd32_shmctl(struct thread *td, struct freebsd32_shmctl_args *uap) in freebsd32_shmctl() argument
1586 if (uap->cmd == IPC_SET) { in freebsd32_shmctl()
1587 if ((error = copyin(uap->buf, &u32.shmid_ds32, in freebsd32_shmctl()
1601 error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&u, &sz); in freebsd32_shmctl()
1606 switch (uap->cmd) { in freebsd32_shmctl()
1613 error = copyout(&u32.shminfo32, uap->buf, in freebsd32_shmctl()
1623 error = copyout(&u32.shm_info32, uap->buf, in freebsd32_shmctl()
1640 error = copyout(&u32.shmid_ds32, uap->buf, in freebsd32_shmctl()
1665 freebsd7_shmctl(struct thread *td, struct freebsd7_shmctl_args *uap) in freebsd7_shmctl() argument
1677 if (uap->cmd == IPC_INFO || uap->cmd == SHM_INFO || in freebsd7_shmctl()
1678 uap->cmd == SHM_STAT) in freebsd7_shmctl()
1682 if (uap->cmd == IPC_SET) { in freebsd7_shmctl()
1683 if ((error = copyin(uap->buf, &old, sizeof(old)))) in freebsd7_shmctl()
1695 error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&buf, &bufsz); in freebsd7_shmctl()
1700 switch (uap->cmd) { in freebsd7_shmctl()
1718 error = copyout(&old, uap->buf, sizeof(old)); in freebsd7_shmctl()