| 894 | } |
| 895 | |
| 896 | int |
| 897 | sys___specialfd(struct thread *td, struct __specialfd_args *args) |
| 898 | { |
| 899 | struct specialfd_eventfd ae; |
| 900 | int error; |
| 901 | |
| 902 | switch (args->type) { |
| 903 | case SPECIALFD_EVENTFD: |
| 904 | if (args->len != sizeof(struct specialfd_eventfd)) { |
| 905 | error = EINVAL; |
| 906 | break; |
| 907 | } |
| 908 | error = copyin(args->req, &ae, sizeof(ae)); |
| 909 | if (error != 0) |
| 910 | break; |
| 911 | if ((ae.flags & ~(EFD_CLOEXEC | EFD_NONBLOCK | |
| 912 | EFD_SEMAPHORE)) != 0) { |
| 913 | error = EINVAL; |
| 914 | break; |
| 915 | } |
| 916 | error = kern_specialfd(td, args->type, &ae); |
| 917 | break; |
| 918 | default: |
| 919 | error = EINVAL; |
| 920 | break; |
| 921 | } |
| 922 | return (error); |
| 923 | } |
| 924 | |
| 925 | int |
| 926 | poll_no_poll(int events) |
nothing calls this directly
no test coverage detected