* Entry point for all SEM calls. */
(td, uap)
| 1739 | * Entry point for all SEM calls. |
| 1740 | */ |
| 1741 | int |
| 1742 | sys_semsys(td, uap) |
| 1743 | struct thread *td; |
| 1744 | /* XXX actually varargs. */ |
| 1745 | struct semsys_args /* { |
| 1746 | int which; |
| 1747 | int a2; |
| 1748 | int a3; |
| 1749 | int a4; |
| 1750 | int a5; |
| 1751 | } */ *uap; |
| 1752 | { |
| 1753 | int error; |
| 1754 | |
| 1755 | AUDIT_ARG_SVIPC_WHICH(uap->which); |
| 1756 | if (uap->which < 0 || uap->which >= nitems(semcalls)) |
| 1757 | return (EINVAL); |
| 1758 | error = (*semcalls[uap->which])(td, &uap->a2); |
| 1759 | return (error); |
| 1760 | } |
| 1761 | |
| 1762 | #ifndef _SYS_SYSPROTO_H_ |
| 1763 | struct freebsd7___semctl_args { |