Author: ed Date: Wed Oct 18 19:22:53 2017 New Revision: 324727 URL: https://svnweb.freebsd.org/changeset/base/324727
Log: Import the latest CloudABI definitions, version 0.16. The most important change in this release is the removal of the poll_fd() system call; CloudABI's equivalent of kevent(). Though I think that kqueue is a lot saner than many of its alternatives, our experience is that emulating this system call on other systems accurately isn't easy. It has become a complex API, even though I'm not convinced this complexity is needed. This is why we've decided to take a different approach, by looking one layer up. We're currently adding an event loop to CloudABI's C library that is API compatible with libuv (except when incompatible with Capsicum). Initially, this event loop will be built on top of plain inefficient poll() calls. Only after this is finished, we'll work our way backwards and design a new set of system calls to optimize it. Interesting challenges will include integrating asynchronous I/O into such a system call API. libuv currently doesn't aio(4) on Linux/BSD, due to it being unreliable and having undesired semantics. Obtained from: https://github.com/NuxiNL/cloudabi Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/cloudabi32/cloudabi32_poll.c head/sys/compat/cloudabi32/cloudabi32_proto.h head/sys/compat/cloudabi32/cloudabi32_syscall.h head/sys/compat/cloudabi32/cloudabi32_syscalls.c head/sys/compat/cloudabi32/cloudabi32_sysent.c head/sys/compat/cloudabi32/cloudabi32_systrace_args.c head/sys/compat/cloudabi64/cloudabi64_poll.c head/sys/compat/cloudabi64/cloudabi64_proto.h head/sys/compat/cloudabi64/cloudabi64_syscall.h head/sys/compat/cloudabi64/cloudabi64_syscalls.c head/sys/compat/cloudabi64/cloudabi64_sysent.c head/sys/compat/cloudabi64/cloudabi64_systrace_args.c head/sys/contrib/cloudabi/cloudabi32_types.h head/sys/contrib/cloudabi/cloudabi64_types.h head/sys/contrib/cloudabi/cloudabi_types_common.h head/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S head/sys/contrib/cloudabi/cloudabi_vdso_i686.S head/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S head/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S head/sys/contrib/cloudabi/syscalls32.master head/sys/contrib/cloudabi/syscalls64.master head/usr.bin/truss/syscalls.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi/cloudabi_fd.c Wed Oct 18 19:22:53 2017 (r324727) @@ -73,9 +73,7 @@ __FBSDID("$FreeBSD$"); MAPPING(CLOUDABI_RIGHT_MEM_MAP, CAP_MMAP) \ MAPPING(CLOUDABI_RIGHT_MEM_MAP_EXEC, CAP_MMAP_X) \ MAPPING(CLOUDABI_RIGHT_POLL_FD_READWRITE, CAP_EVENT) \ - MAPPING(CLOUDABI_RIGHT_POLL_MODIFY, CAP_KQUEUE_CHANGE) \ MAPPING(CLOUDABI_RIGHT_POLL_PROC_TERMINATE, CAP_EVENT) \ - MAPPING(CLOUDABI_RIGHT_POLL_WAIT, CAP_KQUEUE_EVENT) \ MAPPING(CLOUDABI_RIGHT_PROC_EXEC, CAP_FEXECVE) \ MAPPING(CLOUDABI_RIGHT_SOCK_SHUTDOWN, CAP_SHUTDOWN) \ @@ -93,9 +91,6 @@ cloudabi_sys_fd_create1(struct thread *td, struct filecaps fcaps = {}; switch (uap->type) { - case CLOUDABI_FILETYPE_POLL: - cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_KQUEUE); - return (kern_kqueue(td, 0, &fcaps)); case CLOUDABI_FILETYPE_SHARED_MEMORY: cap_rights_init(&fcaps.fc_rights, CAP_FSTAT, CAP_FTRUNCATE, CAP_MMAP_RWX); @@ -201,8 +196,6 @@ cloudabi_convert_filetype(const struct file *fp) switch (fp->f_type) { case DTYPE_FIFO: return (CLOUDABI_FILETYPE_SOCKET_STREAM); - case DTYPE_KQUEUE: - return (CLOUDABI_FILETYPE_POLL); case DTYPE_PIPE: return (CLOUDABI_FILETYPE_SOCKET_STREAM); case DTYPE_PROCDESC: @@ -315,10 +308,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t CLOUDABI_RIGHT_MEM_MAP_EXEC | CLOUDABI_RIGHT_POLL_FD_READWRITE | CLOUDABI_RIGHT_PROC_EXEC; - break; - case CLOUDABI_FILETYPE_POLL: - *base &= ~CLOUDABI_RIGHT_FILE_ADVISE; - *inheriting = 0; break; case CLOUDABI_FILETYPE_PROCESS: *base &= ~(CLOUDABI_RIGHT_FILE_ADVISE | Modified: head/sys/compat/cloudabi32/cloudabi32_poll.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_poll.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi32/cloudabi32_poll.c Wed Oct 18 19:22:53 2017 (r324727) @@ -79,7 +79,6 @@ convert_signal(int sig) struct cloudabi32_kevent_args { const cloudabi32_subscription_t *in; cloudabi32_event_t *out; - bool once; }; /* Converts CloudABI's subscription objects to FreeBSD's struct kevent. */ @@ -124,9 +123,7 @@ cloudabi32_kevent_copyin(void *arg, struct kevent *kev case CLOUDABI_EVENTTYPE_FD_READ: kevp->filter = EVFILT_READ; kevp->ident = sub.fd_readwrite.fd; - if ((sub.fd_readwrite.flags & - CLOUDABI_SUBSCRIPTION_FD_READWRITE_POLL) != 0) - kevp->fflags = NOTE_FILE_POLL; + kevp->fflags = NOTE_FILE_POLL; break; case CLOUDABI_EVENTTYPE_FD_WRITE: kevp->filter = EVFILT_WRITE; @@ -138,24 +135,7 @@ cloudabi32_kevent_copyin(void *arg, struct kevent *kev kevp->fflags = NOTE_EXIT; break; } - if (args->once) { - /* Ignore flags. Simply use oneshot mode. */ - kevp->flags = EV_ADD | EV_ONESHOT; - } else { - /* Translate flags. */ - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ADD) != 0) - kevp->flags |= EV_ADD; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_CLEAR) != 0) - kevp->flags |= EV_CLEAR; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DELETE) != 0) - kevp->flags |= EV_DELETE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DISABLE) != 0) - kevp->flags |= EV_DISABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ENABLE) != 0) - kevp->flags |= EV_ENABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ONESHOT) != 0) - kevp->flags |= EV_ONESHOT; - } + kevp->flags = EV_ADD | EV_ONESHOT; ++kevp; } return (0); @@ -238,7 +218,6 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi struct cloudabi32_kevent_args args = { .in = uap->in, .out = uap->out, - .once = true, }; struct kevent_copyops copyops = { .k_copyin = cloudabi32_kevent_copyin, @@ -368,41 +347,4 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi } return (kern_kevent_anonymous(td, uap->nsubscriptions, ©ops)); -} - -int -cloudabi32_sys_poll_fd(struct thread *td, - struct cloudabi32_sys_poll_fd_args *uap) -{ - struct cloudabi32_kevent_args args = { - .in = uap->in, - .out = uap->out, - .once = false, - }; - struct kevent_copyops copyops = { - .k_copyin = cloudabi32_kevent_copyin, - .k_copyout = cloudabi32_kevent_copyout, - .arg = &args, - }; - cloudabi32_subscription_t subtimo; - struct timespec timeout; - int error; - - if (uap->timeout != NULL) { - /* Poll with a timeout. */ - error = copyin(uap->timeout, &subtimo, sizeof(subtimo)); - if (error != 0) - return (error); - if (subtimo.type != CLOUDABI_EVENTTYPE_CLOCK || - subtimo.clock.flags != 0) - return (EINVAL); - timeout.tv_sec = subtimo.clock.timeout / 1000000000; - timeout.tv_nsec = subtimo.clock.timeout % 1000000000; - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, &timeout)); - } else { - /* Poll without a timeout. */ - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, NULL)); - } } Modified: head/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_proto.h Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi32/cloudabi32_proto.h Wed Oct 18 19:22:53 2017 (r324727) @@ -227,14 +227,6 @@ struct cloudabi32_sys_poll_args { char out_l_[PADL_(cloudabi32_event_t *)]; cloudabi32_event_t * out; char out_r_[PADR_(cloudabi32_event_t *)]; char nsubscriptions_l_[PADL_(size_t)]; size_t nsubscriptions; char nsubscriptions_r_[PADR_(size_t)]; }; -struct cloudabi32_sys_poll_fd_args { - char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char in_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * in; char in_r_[PADR_(const cloudabi32_subscription_t *)]; - char in_len_l_[PADL_(size_t)]; size_t in_len; char in_len_r_[PADR_(size_t)]; - char out_l_[PADL_(cloudabi32_event_t *)]; cloudabi32_event_t * out; char out_r_[PADR_(cloudabi32_event_t *)]; - char out_len_l_[PADL_(size_t)]; size_t out_len; char out_len_r_[PADR_(size_t)]; - char timeout_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * timeout; char timeout_r_[PADR_(const cloudabi32_subscription_t *)]; -}; struct cloudabi_sys_proc_exec_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char data_l_[PADL_(const void *)]; const void * data; char data_r_[PADR_(const void *)]; @@ -317,7 +309,6 @@ int cloudabi_sys_mem_protect(struct thread *, struct c int cloudabi_sys_mem_sync(struct thread *, struct cloudabi_sys_mem_sync_args *); int cloudabi_sys_mem_unmap(struct thread *, struct cloudabi_sys_mem_unmap_args *); int cloudabi32_sys_poll(struct thread *, struct cloudabi32_sys_poll_args *); -int cloudabi32_sys_poll_fd(struct thread *, struct cloudabi32_sys_poll_fd_args *); int cloudabi_sys_proc_exec(struct thread *, struct cloudabi_sys_proc_exec_args *); int cloudabi_sys_proc_exit(struct thread *, struct cloudabi_sys_proc_exit_args *); int cloudabi_sys_proc_fork(struct thread *, struct cloudabi_sys_proc_fork_args *); @@ -403,7 +394,6 @@ int cloudabi_sys_thread_yield(struct thread *, struct #define CLOUDABI32_SYS_AUE_cloudabi_sys_mem_sync AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_mem_unmap AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi32_sys_poll AUE_NULL -#define CLOUDABI32_SYS_AUE_cloudabi32_sys_poll_fd AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_exec AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_exit AUE_NULL #define CLOUDABI32_SYS_AUE_cloudabi_sys_proc_fork AUE_NULL Modified: head/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscall.h Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi32/cloudabi32_syscall.h Wed Oct 18 19:22:53 2017 (r324727) @@ -43,16 +43,15 @@ #define CLOUDABI32_SYS_cloudabi_sys_mem_sync 35 #define CLOUDABI32_SYS_cloudabi_sys_mem_unmap 36 #define CLOUDABI32_SYS_cloudabi32_sys_poll 37 -#define CLOUDABI32_SYS_cloudabi32_sys_poll_fd 38 -#define CLOUDABI32_SYS_cloudabi_sys_proc_exec 39 -#define CLOUDABI32_SYS_cloudabi_sys_proc_exit 40 -#define CLOUDABI32_SYS_cloudabi_sys_proc_fork 41 -#define CLOUDABI32_SYS_cloudabi_sys_proc_raise 42 -#define CLOUDABI32_SYS_cloudabi_sys_random_get 43 -#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 44 -#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 45 -#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 46 -#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 47 -#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 48 -#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 49 -#define CLOUDABI32_SYS_MAXSYSCALL 50 +#define CLOUDABI32_SYS_cloudabi_sys_proc_exec 38 +#define CLOUDABI32_SYS_cloudabi_sys_proc_exit 39 +#define CLOUDABI32_SYS_cloudabi_sys_proc_fork 40 +#define CLOUDABI32_SYS_cloudabi_sys_proc_raise 41 +#define CLOUDABI32_SYS_cloudabi_sys_random_get 42 +#define CLOUDABI32_SYS_cloudabi32_sys_sock_recv 43 +#define CLOUDABI32_SYS_cloudabi32_sys_sock_send 44 +#define CLOUDABI32_SYS_cloudabi_sys_sock_shutdown 45 +#define CLOUDABI32_SYS_cloudabi32_sys_thread_create 46 +#define CLOUDABI32_SYS_cloudabi_sys_thread_exit 47 +#define CLOUDABI32_SYS_cloudabi_sys_thread_yield 48 +#define CLOUDABI32_SYS_MAXSYSCALL 49 Modified: head/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed Oct 18 19:22:53 2017 (r324727) @@ -44,16 +44,15 @@ const char *cloudabi32_syscallnames[] = { "cloudabi_sys_mem_sync", /* 35 = cloudabi_sys_mem_sync */ "cloudabi_sys_mem_unmap", /* 36 = cloudabi_sys_mem_unmap */ "cloudabi32_sys_poll", /* 37 = cloudabi32_sys_poll */ - "cloudabi32_sys_poll_fd", /* 38 = cloudabi32_sys_poll_fd */ - "cloudabi_sys_proc_exec", /* 39 = cloudabi_sys_proc_exec */ - "cloudabi_sys_proc_exit", /* 40 = cloudabi_sys_proc_exit */ - "cloudabi_sys_proc_fork", /* 41 = cloudabi_sys_proc_fork */ - "cloudabi_sys_proc_raise", /* 42 = cloudabi_sys_proc_raise */ - "cloudabi_sys_random_get", /* 43 = cloudabi_sys_random_get */ - "cloudabi32_sys_sock_recv", /* 44 = cloudabi32_sys_sock_recv */ - "cloudabi32_sys_sock_send", /* 45 = cloudabi32_sys_sock_send */ - "cloudabi_sys_sock_shutdown", /* 46 = cloudabi_sys_sock_shutdown */ - "cloudabi32_sys_thread_create", /* 47 = cloudabi32_sys_thread_create */ - "cloudabi_sys_thread_exit", /* 48 = cloudabi_sys_thread_exit */ - "cloudabi_sys_thread_yield", /* 49 = cloudabi_sys_thread_yield */ + "cloudabi_sys_proc_exec", /* 38 = cloudabi_sys_proc_exec */ + "cloudabi_sys_proc_exit", /* 39 = cloudabi_sys_proc_exit */ + "cloudabi_sys_proc_fork", /* 40 = cloudabi_sys_proc_fork */ + "cloudabi_sys_proc_raise", /* 41 = cloudabi_sys_proc_raise */ + "cloudabi_sys_random_get", /* 42 = cloudabi_sys_random_get */ + "cloudabi32_sys_sock_recv", /* 43 = cloudabi32_sys_sock_recv */ + "cloudabi32_sys_sock_send", /* 44 = cloudabi32_sys_sock_send */ + "cloudabi_sys_sock_shutdown", /* 45 = cloudabi_sys_sock_shutdown */ + "cloudabi32_sys_thread_create", /* 46 = cloudabi32_sys_thread_create */ + "cloudabi_sys_thread_exit", /* 47 = cloudabi_sys_thread_exit */ + "cloudabi_sys_thread_yield", /* 48 = cloudabi_sys_thread_yield */ }; Modified: head/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_sysent.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi32/cloudabi32_sysent.c Wed Oct 18 19:22:53 2017 (r324727) @@ -52,16 +52,15 @@ struct sysent cloudabi32_sysent[] = { { AS(cloudabi_sys_mem_sync_args), (sy_call_t *)cloudabi_sys_mem_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 35 = cloudabi_sys_mem_sync */ { AS(cloudabi_sys_mem_unmap_args), (sy_call_t *)cloudabi_sys_mem_unmap, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 36 = cloudabi_sys_mem_unmap */ { AS(cloudabi32_sys_poll_args), (sy_call_t *)cloudabi32_sys_poll, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 37 = cloudabi32_sys_poll */ - { AS(cloudabi32_sys_poll_fd_args), (sy_call_t *)cloudabi32_sys_poll_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi32_sys_poll_fd */ - { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi_sys_proc_exec */ - { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_exit */ - { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_fork */ - { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_proc_raise */ - { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi_sys_random_get */ - { AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi32_sys_sock_recv */ - { AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi32_sys_sock_send */ - { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi_sys_sock_shutdown */ - { AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi32_sys_thread_create */ - { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_thread_exit */ - { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi_sys_thread_yield */ + { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi_sys_proc_exec */ + { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi_sys_proc_exit */ + { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_fork */ + { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_raise */ + { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_random_get */ + { AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi32_sys_sock_recv */ + { AS(cloudabi32_sys_sock_send_args), (sy_call_t *)cloudabi32_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi32_sys_sock_send */ + { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi_sys_sock_shutdown */ + { AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi32_sys_thread_create */ + { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_thread_exit */ + { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_thread_yield */ }; Modified: head/sys/compat/cloudabi32/cloudabi32_systrace_args.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_systrace_args.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi32/cloudabi32_systrace_args.c Wed Oct 18 19:22:53 2017 (r324727) @@ -357,20 +357,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } - /* cloudabi32_sys_poll_fd */ - case 38: { - struct cloudabi32_sys_poll_fd_args *p = params; - iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->in; /* const cloudabi32_subscription_t * */ - uarg[2] = p->in_len; /* size_t */ - uarg[3] = (intptr_t) p->out; /* cloudabi32_event_t * */ - uarg[4] = p->out_len; /* size_t */ - uarg[5] = (intptr_t) p->timeout; /* const cloudabi32_subscription_t * */ - *n_args = 6; - break; - } /* cloudabi_sys_proc_exec */ - case 39: { + case 38: { struct cloudabi_sys_proc_exec_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->data; /* const void * */ @@ -381,26 +369,26 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_proc_exit */ - case 40: { + case 39: { struct cloudabi_sys_proc_exit_args *p = params; iarg[0] = p->rval; /* cloudabi_exitcode_t */ *n_args = 1; break; } /* cloudabi_sys_proc_fork */ - case 41: { + case 40: { *n_args = 0; break; } /* cloudabi_sys_proc_raise */ - case 42: { + case 41: { struct cloudabi_sys_proc_raise_args *p = params; iarg[0] = p->sig; /* cloudabi_signal_t */ *n_args = 1; break; } /* cloudabi_sys_random_get */ - case 43: { + case 42: { struct cloudabi_sys_random_get_args *p = params; uarg[0] = (intptr_t) p->buf; /* void * */ uarg[1] = p->buf_len; /* size_t */ @@ -408,7 +396,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi32_sys_sock_recv */ - case 44: { + case 43: { struct cloudabi32_sys_sock_recv_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi32_recv_in_t * */ @@ -417,7 +405,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi32_sys_sock_send */ - case 45: { + case 44: { struct cloudabi32_sys_sock_send_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi32_send_in_t * */ @@ -426,7 +414,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_sock_shutdown */ - case 46: { + case 45: { struct cloudabi_sys_sock_shutdown_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ iarg[1] = p->how; /* cloudabi_sdflags_t */ @@ -434,14 +422,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi32_sys_thread_create */ - case 47: { + case 46: { struct cloudabi32_sys_thread_create_args *p = params; uarg[0] = (intptr_t) p->attr; /* cloudabi32_threadattr_t * */ *n_args = 1; break; } /* cloudabi_sys_thread_exit */ - case 48: { + case 47: { struct cloudabi_sys_thread_exit_args *p = params; uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */ iarg[1] = p->scope; /* cloudabi_scope_t */ @@ -449,7 +437,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_thread_yield */ - case 49: { + case 48: { *n_args = 0; break; } @@ -1083,38 +1071,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* cloudabi32_sys_poll_fd */ + /* cloudabi_sys_proc_exec */ case 38: switch(ndx) { case 0: p = "cloudabi_fd_t"; break; case 1: - p = "userland const cloudabi32_subscription_t *"; - break; - case 2: - p = "size_t"; - break; - case 3: - p = "userland cloudabi32_event_t *"; - break; - case 4: - p = "size_t"; - break; - case 5: - p = "userland const cloudabi32_subscription_t *"; - break; - default: - break; - }; - break; - /* cloudabi_sys_proc_exec */ - case 39: - switch(ndx) { - case 0: - p = "cloudabi_fd_t"; - break; - case 1: p = "userland const void *"; break; case 2: @@ -1131,7 +1094,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_proc_exit */ - case 40: + case 39: switch(ndx) { case 0: p = "cloudabi_exitcode_t"; @@ -1141,10 +1104,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_proc_fork */ - case 41: + case 40: break; /* cloudabi_sys_proc_raise */ - case 42: + case 41: switch(ndx) { case 0: p = "cloudabi_signal_t"; @@ -1154,7 +1117,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_random_get */ - case 43: + case 42: switch(ndx) { case 0: p = "userland void *"; @@ -1167,7 +1130,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi32_sys_sock_recv */ - case 44: + case 43: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1183,7 +1146,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi32_sys_sock_send */ - case 45: + case 44: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1199,7 +1162,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_sock_shutdown */ - case 46: + case 45: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1212,7 +1175,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi32_sys_thread_create */ - case 47: + case 46: switch(ndx) { case 0: p = "userland cloudabi32_threadattr_t *"; @@ -1222,7 +1185,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_thread_exit */ - case 48: + case 47: switch(ndx) { case 0: p = "userland cloudabi_lock_t *"; @@ -1235,7 +1198,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_thread_yield */ - case 49: + case 48: break; default: break; @@ -1438,60 +1401,55 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "size_t"; break; - /* cloudabi32_sys_poll_fd */ + /* cloudabi_sys_proc_exec */ case 38: if (ndx == 0 || ndx == 1) - p = "size_t"; - break; - /* cloudabi_sys_proc_exec */ - case 39: - if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_proc_exit */ - case 40: + case 39: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_proc_fork */ - case 41: + case 40: /* cloudabi_sys_proc_raise */ - case 42: + case 41: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_random_get */ - case 43: + case 42: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi32_sys_sock_recv */ - case 44: + case 43: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi32_sys_sock_send */ - case 45: + case 44: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_sock_shutdown */ - case 46: + case 45: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi32_sys_thread_create */ - case 47: + case 46: if (ndx == 0 || ndx == 1) p = "cloudabi_tid_t"; break; /* cloudabi_sys_thread_exit */ - case 48: + case 47: if (ndx == 0 || ndx == 1) p = "void"; break; /* cloudabi_sys_thread_yield */ - case 49: + case 48: default: break; }; Modified: head/sys/compat/cloudabi64/cloudabi64_poll.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_poll.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi64/cloudabi64_poll.c Wed Oct 18 19:22:53 2017 (r324727) @@ -79,7 +79,6 @@ convert_signal(int sig) struct cloudabi64_kevent_args { const cloudabi64_subscription_t *in; cloudabi64_event_t *out; - bool once; }; /* Converts CloudABI's subscription objects to FreeBSD's struct kevent. */ @@ -124,9 +123,7 @@ cloudabi64_kevent_copyin(void *arg, struct kevent *kev case CLOUDABI_EVENTTYPE_FD_READ: kevp->filter = EVFILT_READ; kevp->ident = sub.fd_readwrite.fd; - if ((sub.fd_readwrite.flags & - CLOUDABI_SUBSCRIPTION_FD_READWRITE_POLL) != 0) - kevp->fflags = NOTE_FILE_POLL; + kevp->fflags = NOTE_FILE_POLL; break; case CLOUDABI_EVENTTYPE_FD_WRITE: kevp->filter = EVFILT_WRITE; @@ -138,24 +135,7 @@ cloudabi64_kevent_copyin(void *arg, struct kevent *kev kevp->fflags = NOTE_EXIT; break; } - if (args->once) { - /* Ignore flags. Simply use oneshot mode. */ - kevp->flags = EV_ADD | EV_ONESHOT; - } else { - /* Translate flags. */ - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ADD) != 0) - kevp->flags |= EV_ADD; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_CLEAR) != 0) - kevp->flags |= EV_CLEAR; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DELETE) != 0) - kevp->flags |= EV_DELETE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_DISABLE) != 0) - kevp->flags |= EV_DISABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ENABLE) != 0) - kevp->flags |= EV_ENABLE; - if ((sub.flags & CLOUDABI_SUBSCRIPTION_ONESHOT) != 0) - kevp->flags |= EV_ONESHOT; - } + kevp->flags = EV_ADD | EV_ONESHOT; ++kevp; } return (0); @@ -238,7 +218,6 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi struct cloudabi64_kevent_args args = { .in = uap->in, .out = uap->out, - .once = true, }; struct kevent_copyops copyops = { .k_copyin = cloudabi64_kevent_copyin, @@ -368,41 +347,4 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi } return (kern_kevent_anonymous(td, uap->nsubscriptions, ©ops)); -} - -int -cloudabi64_sys_poll_fd(struct thread *td, - struct cloudabi64_sys_poll_fd_args *uap) -{ - struct cloudabi64_kevent_args args = { - .in = uap->in, - .out = uap->out, - .once = false, - }; - struct kevent_copyops copyops = { - .k_copyin = cloudabi64_kevent_copyin, - .k_copyout = cloudabi64_kevent_copyout, - .arg = &args, - }; - cloudabi64_subscription_t subtimo; - struct timespec timeout; - int error; - - if (uap->timeout != NULL) { - /* Poll with a timeout. */ - error = copyin(uap->timeout, &subtimo, sizeof(subtimo)); - if (error != 0) - return (error); - if (subtimo.type != CLOUDABI_EVENTTYPE_CLOCK || - subtimo.clock.flags != 0) - return (EINVAL); - timeout.tv_sec = subtimo.clock.timeout / 1000000000; - timeout.tv_nsec = subtimo.clock.timeout % 1000000000; - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, &timeout)); - } else { - /* Poll without a timeout. */ - return (kern_kevent(td, uap->fd, uap->in_len, uap->out_len, - ©ops, NULL)); - } } Modified: head/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_proto.h Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi64/cloudabi64_proto.h Wed Oct 18 19:22:53 2017 (r324727) @@ -227,14 +227,6 @@ struct cloudabi64_sys_poll_args { char out_l_[PADL_(cloudabi64_event_t *)]; cloudabi64_event_t * out; char out_r_[PADR_(cloudabi64_event_t *)]; char nsubscriptions_l_[PADL_(size_t)]; size_t nsubscriptions; char nsubscriptions_r_[PADR_(size_t)]; }; -struct cloudabi64_sys_poll_fd_args { - char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; - char in_l_[PADL_(const cloudabi64_subscription_t *)]; const cloudabi64_subscription_t * in; char in_r_[PADR_(const cloudabi64_subscription_t *)]; - char in_len_l_[PADL_(size_t)]; size_t in_len; char in_len_r_[PADR_(size_t)]; - char out_l_[PADL_(cloudabi64_event_t *)]; cloudabi64_event_t * out; char out_r_[PADR_(cloudabi64_event_t *)]; - char out_len_l_[PADL_(size_t)]; size_t out_len; char out_len_r_[PADR_(size_t)]; - char timeout_l_[PADL_(const cloudabi64_subscription_t *)]; const cloudabi64_subscription_t * timeout; char timeout_r_[PADR_(const cloudabi64_subscription_t *)]; -}; struct cloudabi_sys_proc_exec_args { char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)]; char data_l_[PADL_(const void *)]; const void * data; char data_r_[PADR_(const void *)]; @@ -317,7 +309,6 @@ int cloudabi_sys_mem_protect(struct thread *, struct c int cloudabi_sys_mem_sync(struct thread *, struct cloudabi_sys_mem_sync_args *); int cloudabi_sys_mem_unmap(struct thread *, struct cloudabi_sys_mem_unmap_args *); int cloudabi64_sys_poll(struct thread *, struct cloudabi64_sys_poll_args *); -int cloudabi64_sys_poll_fd(struct thread *, struct cloudabi64_sys_poll_fd_args *); int cloudabi_sys_proc_exec(struct thread *, struct cloudabi_sys_proc_exec_args *); int cloudabi_sys_proc_exit(struct thread *, struct cloudabi_sys_proc_exit_args *); int cloudabi_sys_proc_fork(struct thread *, struct cloudabi_sys_proc_fork_args *); @@ -403,7 +394,6 @@ int cloudabi_sys_thread_yield(struct thread *, struct #define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_sync AUE_NULL #define CLOUDABI64_SYS_AUE_cloudabi_sys_mem_unmap AUE_NULL #define CLOUDABI64_SYS_AUE_cloudabi64_sys_poll AUE_NULL -#define CLOUDABI64_SYS_AUE_cloudabi64_sys_poll_fd AUE_NULL #define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_exec AUE_NULL #define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_exit AUE_NULL #define CLOUDABI64_SYS_AUE_cloudabi_sys_proc_fork AUE_NULL Modified: head/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscall.h Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi64/cloudabi64_syscall.h Wed Oct 18 19:22:53 2017 (r324727) @@ -43,16 +43,15 @@ #define CLOUDABI64_SYS_cloudabi_sys_mem_sync 35 #define CLOUDABI64_SYS_cloudabi_sys_mem_unmap 36 #define CLOUDABI64_SYS_cloudabi64_sys_poll 37 -#define CLOUDABI64_SYS_cloudabi64_sys_poll_fd 38 -#define CLOUDABI64_SYS_cloudabi_sys_proc_exec 39 -#define CLOUDABI64_SYS_cloudabi_sys_proc_exit 40 -#define CLOUDABI64_SYS_cloudabi_sys_proc_fork 41 -#define CLOUDABI64_SYS_cloudabi_sys_proc_raise 42 -#define CLOUDABI64_SYS_cloudabi_sys_random_get 43 -#define CLOUDABI64_SYS_cloudabi64_sys_sock_recv 44 -#define CLOUDABI64_SYS_cloudabi64_sys_sock_send 45 -#define CLOUDABI64_SYS_cloudabi_sys_sock_shutdown 46 -#define CLOUDABI64_SYS_cloudabi64_sys_thread_create 47 -#define CLOUDABI64_SYS_cloudabi_sys_thread_exit 48 -#define CLOUDABI64_SYS_cloudabi_sys_thread_yield 49 -#define CLOUDABI64_SYS_MAXSYSCALL 50 +#define CLOUDABI64_SYS_cloudabi_sys_proc_exec 38 +#define CLOUDABI64_SYS_cloudabi_sys_proc_exit 39 +#define CLOUDABI64_SYS_cloudabi_sys_proc_fork 40 +#define CLOUDABI64_SYS_cloudabi_sys_proc_raise 41 +#define CLOUDABI64_SYS_cloudabi_sys_random_get 42 +#define CLOUDABI64_SYS_cloudabi64_sys_sock_recv 43 +#define CLOUDABI64_SYS_cloudabi64_sys_sock_send 44 +#define CLOUDABI64_SYS_cloudabi_sys_sock_shutdown 45 +#define CLOUDABI64_SYS_cloudabi64_sys_thread_create 46 +#define CLOUDABI64_SYS_cloudabi_sys_thread_exit 47 +#define CLOUDABI64_SYS_cloudabi_sys_thread_yield 48 +#define CLOUDABI64_SYS_MAXSYSCALL 49 Modified: head/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_syscalls.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi64/cloudabi64_syscalls.c Wed Oct 18 19:22:53 2017 (r324727) @@ -44,16 +44,15 @@ const char *cloudabi64_syscallnames[] = { "cloudabi_sys_mem_sync", /* 35 = cloudabi_sys_mem_sync */ "cloudabi_sys_mem_unmap", /* 36 = cloudabi_sys_mem_unmap */ "cloudabi64_sys_poll", /* 37 = cloudabi64_sys_poll */ - "cloudabi64_sys_poll_fd", /* 38 = cloudabi64_sys_poll_fd */ - "cloudabi_sys_proc_exec", /* 39 = cloudabi_sys_proc_exec */ - "cloudabi_sys_proc_exit", /* 40 = cloudabi_sys_proc_exit */ - "cloudabi_sys_proc_fork", /* 41 = cloudabi_sys_proc_fork */ - "cloudabi_sys_proc_raise", /* 42 = cloudabi_sys_proc_raise */ - "cloudabi_sys_random_get", /* 43 = cloudabi_sys_random_get */ - "cloudabi64_sys_sock_recv", /* 44 = cloudabi64_sys_sock_recv */ - "cloudabi64_sys_sock_send", /* 45 = cloudabi64_sys_sock_send */ - "cloudabi_sys_sock_shutdown", /* 46 = cloudabi_sys_sock_shutdown */ - "cloudabi64_sys_thread_create", /* 47 = cloudabi64_sys_thread_create */ - "cloudabi_sys_thread_exit", /* 48 = cloudabi_sys_thread_exit */ - "cloudabi_sys_thread_yield", /* 49 = cloudabi_sys_thread_yield */ + "cloudabi_sys_proc_exec", /* 38 = cloudabi_sys_proc_exec */ + "cloudabi_sys_proc_exit", /* 39 = cloudabi_sys_proc_exit */ + "cloudabi_sys_proc_fork", /* 40 = cloudabi_sys_proc_fork */ + "cloudabi_sys_proc_raise", /* 41 = cloudabi_sys_proc_raise */ + "cloudabi_sys_random_get", /* 42 = cloudabi_sys_random_get */ + "cloudabi64_sys_sock_recv", /* 43 = cloudabi64_sys_sock_recv */ + "cloudabi64_sys_sock_send", /* 44 = cloudabi64_sys_sock_send */ + "cloudabi_sys_sock_shutdown", /* 45 = cloudabi_sys_sock_shutdown */ + "cloudabi64_sys_thread_create", /* 46 = cloudabi64_sys_thread_create */ + "cloudabi_sys_thread_exit", /* 47 = cloudabi_sys_thread_exit */ + "cloudabi_sys_thread_yield", /* 48 = cloudabi_sys_thread_yield */ }; Modified: head/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_sysent.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi64/cloudabi64_sysent.c Wed Oct 18 19:22:53 2017 (r324727) @@ -52,16 +52,15 @@ struct sysent cloudabi64_sysent[] = { { AS(cloudabi_sys_mem_sync_args), (sy_call_t *)cloudabi_sys_mem_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 35 = cloudabi_sys_mem_sync */ { AS(cloudabi_sys_mem_unmap_args), (sy_call_t *)cloudabi_sys_mem_unmap, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 36 = cloudabi_sys_mem_unmap */ { AS(cloudabi64_sys_poll_args), (sy_call_t *)cloudabi64_sys_poll, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 37 = cloudabi64_sys_poll */ - { AS(cloudabi64_sys_poll_fd_args), (sy_call_t *)cloudabi64_sys_poll_fd, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi64_sys_poll_fd */ - { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi_sys_proc_exec */ - { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_exit */ - { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_fork */ - { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_proc_raise */ - { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi_sys_random_get */ - { AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi64_sys_sock_recv */ - { AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi64_sys_sock_send */ - { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi_sys_sock_shutdown */ - { AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi64_sys_thread_create */ - { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_thread_exit */ - { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 49 = cloudabi_sys_thread_yield */ + { AS(cloudabi_sys_proc_exec_args), (sy_call_t *)cloudabi_sys_proc_exec, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 38 = cloudabi_sys_proc_exec */ + { AS(cloudabi_sys_proc_exit_args), (sy_call_t *)cloudabi_sys_proc_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 39 = cloudabi_sys_proc_exit */ + { 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 40 = cloudabi_sys_proc_fork */ + { AS(cloudabi_sys_proc_raise_args), (sy_call_t *)cloudabi_sys_proc_raise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 41 = cloudabi_sys_proc_raise */ + { AS(cloudabi_sys_random_get_args), (sy_call_t *)cloudabi_sys_random_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 42 = cloudabi_sys_random_get */ + { AS(cloudabi64_sys_sock_recv_args), (sy_call_t *)cloudabi64_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 43 = cloudabi64_sys_sock_recv */ + { AS(cloudabi64_sys_sock_send_args), (sy_call_t *)cloudabi64_sys_sock_send, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 44 = cloudabi64_sys_sock_send */ + { AS(cloudabi_sys_sock_shutdown_args), (sy_call_t *)cloudabi_sys_sock_shutdown, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 45 = cloudabi_sys_sock_shutdown */ + { AS(cloudabi64_sys_thread_create_args), (sy_call_t *)cloudabi64_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 46 = cloudabi64_sys_thread_create */ + { AS(cloudabi_sys_thread_exit_args), (sy_call_t *)cloudabi_sys_thread_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 47 = cloudabi_sys_thread_exit */ + { 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 48 = cloudabi_sys_thread_yield */ }; Modified: head/sys/compat/cloudabi64/cloudabi64_systrace_args.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Wed Oct 18 18:59:35 2017 (r324726) +++ head/sys/compat/cloudabi64/cloudabi64_systrace_args.c Wed Oct 18 19:22:53 2017 (r324727) @@ -357,20 +357,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 3; break; } - /* cloudabi64_sys_poll_fd */ - case 38: { - struct cloudabi64_sys_poll_fd_args *p = params; - iarg[0] = p->fd; /* cloudabi_fd_t */ - uarg[1] = (intptr_t) p->in; /* const cloudabi64_subscription_t * */ - uarg[2] = p->in_len; /* size_t */ - uarg[3] = (intptr_t) p->out; /* cloudabi64_event_t * */ - uarg[4] = p->out_len; /* size_t */ - uarg[5] = (intptr_t) p->timeout; /* const cloudabi64_subscription_t * */ - *n_args = 6; - break; - } /* cloudabi_sys_proc_exec */ - case 39: { + case 38: { struct cloudabi_sys_proc_exec_args *p = params; iarg[0] = p->fd; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->data; /* const void * */ @@ -381,26 +369,26 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_proc_exit */ - case 40: { + case 39: { struct cloudabi_sys_proc_exit_args *p = params; iarg[0] = p->rval; /* cloudabi_exitcode_t */ *n_args = 1; break; } /* cloudabi_sys_proc_fork */ - case 41: { + case 40: { *n_args = 0; break; } /* cloudabi_sys_proc_raise */ - case 42: { + case 41: { struct cloudabi_sys_proc_raise_args *p = params; iarg[0] = p->sig; /* cloudabi_signal_t */ *n_args = 1; break; } /* cloudabi_sys_random_get */ - case 43: { + case 42: { struct cloudabi_sys_random_get_args *p = params; uarg[0] = (intptr_t) p->buf; /* void * */ uarg[1] = p->buf_len; /* size_t */ @@ -408,7 +396,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi64_sys_sock_recv */ - case 44: { + case 43: { struct cloudabi64_sys_sock_recv_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi64_recv_in_t * */ @@ -417,7 +405,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi64_sys_sock_send */ - case 45: { + case 44: { struct cloudabi64_sys_sock_send_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ uarg[1] = (intptr_t) p->in; /* const cloudabi64_send_in_t * */ @@ -426,7 +414,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_sock_shutdown */ - case 46: { + case 45: { struct cloudabi_sys_sock_shutdown_args *p = params; iarg[0] = p->sock; /* cloudabi_fd_t */ iarg[1] = p->how; /* cloudabi_sdflags_t */ @@ -434,14 +422,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi64_sys_thread_create */ - case 47: { + case 46: { struct cloudabi64_sys_thread_create_args *p = params; uarg[0] = (intptr_t) p->attr; /* cloudabi64_threadattr_t * */ *n_args = 1; break; } /* cloudabi_sys_thread_exit */ - case 48: { + case 47: { struct cloudabi_sys_thread_exit_args *p = params; uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */ iarg[1] = p->scope; /* cloudabi_scope_t */ @@ -449,7 +437,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg break; } /* cloudabi_sys_thread_yield */ - case 49: { + case 48: { *n_args = 0; break; } @@ -1083,38 +1071,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* cloudabi64_sys_poll_fd */ + /* cloudabi_sys_proc_exec */ case 38: switch(ndx) { case 0: p = "cloudabi_fd_t"; break; case 1: - p = "userland const cloudabi64_subscription_t *"; - break; - case 2: - p = "size_t"; - break; - case 3: - p = "userland cloudabi64_event_t *"; - break; - case 4: - p = "size_t"; - break; - case 5: - p = "userland const cloudabi64_subscription_t *"; - break; - default: - break; - }; - break; - /* cloudabi_sys_proc_exec */ - case 39: - switch(ndx) { - case 0: - p = "cloudabi_fd_t"; - break; - case 1: p = "userland const void *"; break; case 2: @@ -1131,7 +1094,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_proc_exit */ - case 40: + case 39: switch(ndx) { case 0: p = "cloudabi_exitcode_t"; @@ -1141,10 +1104,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_proc_fork */ - case 41: + case 40: break; /* cloudabi_sys_proc_raise */ - case 42: + case 41: switch(ndx) { case 0: p = "cloudabi_signal_t"; @@ -1154,7 +1117,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_random_get */ - case 43: + case 42: switch(ndx) { case 0: p = "userland void *"; @@ -1167,7 +1130,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi64_sys_sock_recv */ - case 44: + case 43: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1183,7 +1146,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi64_sys_sock_send */ - case 45: + case 44: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1199,7 +1162,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi_sys_sock_shutdown */ - case 46: + case 45: switch(ndx) { case 0: p = "cloudabi_fd_t"; @@ -1212,7 +1175,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d }; break; /* cloudabi64_sys_thread_create */ - case 47: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"