* Entry point for all MSG calls. * * XXX actually varargs. * struct msgsys_args { * int which; * int a2; * int a3; * int a4; * int a5; * int a6; * } *uap; */
| 1846 | * } *uap; |
| 1847 | */ |
| 1848 | int |
| 1849 | sys_msgsys(struct thread *td, struct msgsys_args *uap) |
| 1850 | { |
| 1851 | int error; |
| 1852 | |
| 1853 | AUDIT_ARG_SVIPC_WHICH(uap->which); |
| 1854 | if (uap->which < 0 || uap->which >= nitems(msgcalls)) |
| 1855 | return (EINVAL); |
| 1856 | error = (*msgcalls[uap->which])(td, &uap->a2); |
| 1857 | return (error); |
| 1858 | } |
| 1859 | |
| 1860 | #ifndef CP |
| 1861 | #define CP(src, dst, fld) do { (dst).fld = (src).fld; } while (0) |