Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2016 16:02:25 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304565 - head/sys/compat/cloudabi32
Message-ID:  <201608211602.u7LG2PiA063764@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Aug 21 16:02:25 2016
New Revision: 304565
URL: https://svnweb.freebsd.org/changeset/base/304565

Log:
  Add source files generated from the 32-bit system call table.

Added:
  head/sys/compat/cloudabi32/cloudabi32_proto.h   (contents, props changed)
  head/sys/compat/cloudabi32/cloudabi32_syscall.h   (contents, props changed)
  head/sys/compat/cloudabi32/cloudabi32_syscalls.c   (contents, props changed)
  head/sys/compat/cloudabi32/cloudabi32_sysent.c   (contents, props changed)
  head/sys/compat/cloudabi32/cloudabi32_systrace_args.c   (contents, props changed)

Added: head/sys/compat/cloudabi32/cloudabi32_proto.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/compat/cloudabi32/cloudabi32_proto.h	Sun Aug 21 16:02:25 2016	(r304565)
@@ -0,0 +1,465 @@
+/*
+ * System call prototypes.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed 
+ */
+
+#ifndef _CLOUDABI32_SYSPROTO_H_
+#define	_CLOUDABI32_SYSPROTO_H_
+
+#include <sys/signal.h>
+#include <sys/acl.h>
+#include <sys/cpuset.h>
+#include <sys/_ffcounter.h>
+#include <sys/_semaphore.h>
+#include <sys/ucontext.h>
+#include <sys/wait.h>
+
+#include <bsm/audit_kevents.h>
+
+struct proc;
+
+struct thread;
+
+#define	PAD_(t)	(sizeof(register_t) <= sizeof(t) ? \
+		0 : sizeof(register_t) - sizeof(t))
+
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define	PADL_(t)	0
+#define	PADR_(t)	PAD_(t)
+#else
+#define	PADL_(t)	PAD_(t)
+#define	PADR_(t)	0
+#endif
+
+struct cloudabi_sys_clock_res_get_args {
+	char clock_id_l_[PADL_(cloudabi_clockid_t)]; cloudabi_clockid_t clock_id; char clock_id_r_[PADR_(cloudabi_clockid_t)];
+};
+struct cloudabi_sys_clock_time_get_args {
+	char clock_id_l_[PADL_(cloudabi_clockid_t)]; cloudabi_clockid_t clock_id; char clock_id_r_[PADR_(cloudabi_clockid_t)];
+	char precision_l_[PADL_(cloudabi_timestamp_t)]; cloudabi_timestamp_t precision; char precision_r_[PADR_(cloudabi_timestamp_t)];
+};
+struct cloudabi_sys_condvar_signal_args {
+	char condvar_l_[PADL_(cloudabi_condvar_t *)]; cloudabi_condvar_t * condvar; char condvar_r_[PADR_(cloudabi_condvar_t *)];
+	char scope_l_[PADL_(cloudabi_scope_t)]; cloudabi_scope_t scope; char scope_r_[PADR_(cloudabi_scope_t)];
+	char nwaiters_l_[PADL_(cloudabi_nthreads_t)]; cloudabi_nthreads_t nwaiters; char nwaiters_r_[PADR_(cloudabi_nthreads_t)];
+};
+struct cloudabi_sys_fd_close_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+};
+struct cloudabi_sys_fd_create1_args {
+	char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)];
+};
+struct cloudabi_sys_fd_create2_args {
+	char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)];
+};
+struct cloudabi_sys_fd_datasync_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+};
+struct cloudabi_sys_fd_dup_args {
+	char from_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t from; char from_r_[PADR_(cloudabi_fd_t)];
+};
+struct cloudabi32_sys_fd_pread_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char iov_l_[PADL_(const cloudabi32_iovec_t *)]; const cloudabi32_iovec_t * iov; char iov_r_[PADR_(const cloudabi32_iovec_t *)];
+	char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)];
+	char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)];
+};
+struct cloudabi32_sys_fd_pwrite_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char iov_l_[PADL_(const cloudabi32_ciovec_t *)]; const cloudabi32_ciovec_t * iov; char iov_r_[PADR_(const cloudabi32_ciovec_t *)];
+	char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)];
+	char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)];
+};
+struct cloudabi32_sys_fd_read_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char iov_l_[PADL_(const cloudabi32_iovec_t *)]; const cloudabi32_iovec_t * iov; char iov_r_[PADR_(const cloudabi32_iovec_t *)];
+	char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_fd_replace_args {
+	char from_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t from; char from_r_[PADR_(cloudabi_fd_t)];
+	char to_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t to; char to_r_[PADR_(cloudabi_fd_t)];
+};
+struct cloudabi_sys_fd_seek_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char offset_l_[PADL_(cloudabi_filedelta_t)]; cloudabi_filedelta_t offset; char offset_r_[PADR_(cloudabi_filedelta_t)];
+	char whence_l_[PADL_(cloudabi_whence_t)]; cloudabi_whence_t whence; char whence_r_[PADR_(cloudabi_whence_t)];
+};
+struct cloudabi_sys_fd_stat_get_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(cloudabi_fdstat_t *)]; cloudabi_fdstat_t * buf; char buf_r_[PADR_(cloudabi_fdstat_t *)];
+};
+struct cloudabi_sys_fd_stat_put_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(const cloudabi_fdstat_t *)]; const cloudabi_fdstat_t * buf; char buf_r_[PADR_(const cloudabi_fdstat_t *)];
+	char flags_l_[PADL_(cloudabi_fdsflags_t)]; cloudabi_fdsflags_t flags; char flags_r_[PADR_(cloudabi_fdsflags_t)];
+};
+struct cloudabi_sys_fd_sync_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+};
+struct cloudabi32_sys_fd_write_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char iov_l_[PADL_(const cloudabi32_ciovec_t *)]; const cloudabi32_ciovec_t * iov; char iov_r_[PADR_(const cloudabi32_ciovec_t *)];
+	char iovcnt_l_[PADL_(size_t)]; size_t iovcnt; char iovcnt_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_file_advise_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)];
+	char len_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t len; char len_r_[PADR_(cloudabi_filesize_t)];
+	char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)];
+};
+struct cloudabi_sys_file_allocate_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char offset_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t offset; char offset_r_[PADR_(cloudabi_filesize_t)];
+	char len_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t len; char len_r_[PADR_(cloudabi_filesize_t)];
+};
+struct cloudabi_sys_file_create_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+	char type_l_[PADL_(cloudabi_filetype_t)]; cloudabi_filetype_t type; char type_r_[PADR_(cloudabi_filetype_t)];
+};
+struct cloudabi_sys_file_link_args {
+	char fd1_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd1; char fd1_r_[PADR_(cloudabi_lookup_t)];
+	char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)];
+	char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)];
+	char fd2_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd2; char fd2_r_[PADR_(cloudabi_fd_t)];
+	char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)];
+	char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_file_open_args {
+	char dirfd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t dirfd; char dirfd_r_[PADR_(cloudabi_lookup_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+	char oflags_l_[PADL_(cloudabi_oflags_t)]; cloudabi_oflags_t oflags; char oflags_r_[PADR_(cloudabi_oflags_t)];
+	char fds_l_[PADL_(const cloudabi_fdstat_t *)]; const cloudabi_fdstat_t * fds; char fds_r_[PADR_(const cloudabi_fdstat_t *)];
+};
+struct cloudabi_sys_file_readdir_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
+	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+	char cookie_l_[PADL_(cloudabi_dircookie_t)]; cloudabi_dircookie_t cookie; char cookie_r_[PADR_(cloudabi_dircookie_t)];
+};
+struct cloudabi_sys_file_readlink_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+	char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
+	char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_file_rename_args {
+	char oldfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t oldfd; char oldfd_r_[PADR_(cloudabi_fd_t)];
+	char old_l_[PADL_(const char *)]; const char * old; char old_r_[PADR_(const char *)];
+	char oldlen_l_[PADL_(size_t)]; size_t oldlen; char oldlen_r_[PADR_(size_t)];
+	char newfd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t newfd; char newfd_r_[PADR_(cloudabi_fd_t)];
+	char new_l_[PADL_(const char *)]; const char * new; char new_r_[PADR_(const char *)];
+	char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_file_stat_fget_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(cloudabi_filestat_t *)]; cloudabi_filestat_t * buf; char buf_r_[PADR_(cloudabi_filestat_t *)];
+};
+struct cloudabi_sys_file_stat_fput_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(const cloudabi_filestat_t *)]; const cloudabi_filestat_t * buf; char buf_r_[PADR_(const cloudabi_filestat_t *)];
+	char flags_l_[PADL_(cloudabi_fsflags_t)]; cloudabi_fsflags_t flags; char flags_r_[PADR_(cloudabi_fsflags_t)];
+};
+struct cloudabi_sys_file_stat_get_args {
+	char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+	char buf_l_[PADL_(cloudabi_filestat_t *)]; cloudabi_filestat_t * buf; char buf_r_[PADR_(cloudabi_filestat_t *)];
+};
+struct cloudabi_sys_file_stat_put_args {
+	char fd_l_[PADL_(cloudabi_lookup_t)]; cloudabi_lookup_t fd; char fd_r_[PADR_(cloudabi_lookup_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+	char buf_l_[PADL_(const cloudabi_filestat_t *)]; const cloudabi_filestat_t * buf; char buf_r_[PADR_(const cloudabi_filestat_t *)];
+	char flags_l_[PADL_(cloudabi_fsflags_t)]; cloudabi_fsflags_t flags; char flags_r_[PADR_(cloudabi_fsflags_t)];
+};
+struct cloudabi_sys_file_symlink_args {
+	char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)];
+	char path1len_l_[PADL_(size_t)]; size_t path1len; char path1len_r_[PADR_(size_t)];
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)];
+	char path2len_l_[PADL_(size_t)]; size_t path2len; char path2len_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_file_unlink_args {
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+	char flags_l_[PADL_(cloudabi_ulflags_t)]; cloudabi_ulflags_t flags; char flags_r_[PADR_(cloudabi_ulflags_t)];
+};
+struct cloudabi_sys_lock_unlock_args {
+	char lock_l_[PADL_(cloudabi_lock_t *)]; cloudabi_lock_t * lock; char lock_r_[PADR_(cloudabi_lock_t *)];
+	char scope_l_[PADL_(cloudabi_scope_t)]; cloudabi_scope_t scope; char scope_r_[PADR_(cloudabi_scope_t)];
+};
+struct cloudabi_sys_mem_advise_args {
+	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+	char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)];
+};
+struct cloudabi_sys_mem_lock_args {
+	char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_mem_map_args {
+	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+	char prot_l_[PADL_(cloudabi_mprot_t)]; cloudabi_mprot_t prot; char prot_r_[PADR_(cloudabi_mprot_t)];
+	char flags_l_[PADL_(cloudabi_mflags_t)]; cloudabi_mflags_t flags; char flags_r_[PADR_(cloudabi_mflags_t)];
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char off_l_[PADL_(cloudabi_filesize_t)]; cloudabi_filesize_t off; char off_r_[PADR_(cloudabi_filesize_t)];
+};
+struct cloudabi_sys_mem_protect_args {
+	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+	char prot_l_[PADL_(cloudabi_mprot_t)]; cloudabi_mprot_t prot; char prot_r_[PADR_(cloudabi_mprot_t)];
+};
+struct cloudabi_sys_mem_sync_args {
+	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+	char flags_l_[PADL_(cloudabi_msflags_t)]; cloudabi_msflags_t flags; char flags_r_[PADR_(cloudabi_msflags_t)];
+};
+struct cloudabi_sys_mem_unlock_args {
+	char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_mem_unmap_args {
+	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+};
+struct cloudabi32_sys_poll_args {
+	char in_l_[PADL_(const cloudabi32_subscription_t *)]; const cloudabi32_subscription_t * in; char in_r_[PADR_(const cloudabi32_subscription_t *)];
+	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 nin_l_[PADL_(size_t)]; size_t nin; char nin_r_[PADR_(size_t)];
+	char out_l_[PADL_(cloudabi32_event_t *)]; cloudabi32_event_t * out; char out_r_[PADR_(cloudabi32_event_t *)];
+	char nout_l_[PADL_(size_t)]; size_t nout; char nout_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 *)];
+	char datalen_l_[PADL_(size_t)]; size_t datalen; char datalen_r_[PADR_(size_t)];
+	char fds_l_[PADL_(const cloudabi_fd_t *)]; const cloudabi_fd_t * fds; char fds_r_[PADR_(const cloudabi_fd_t *)];
+	char fdslen_l_[PADL_(size_t)]; size_t fdslen; char fdslen_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_proc_exit_args {
+	char rval_l_[PADL_(cloudabi_exitcode_t)]; cloudabi_exitcode_t rval; char rval_r_[PADR_(cloudabi_exitcode_t)];
+};
+struct cloudabi_sys_proc_fork_args {
+	register_t dummy;
+};
+struct cloudabi_sys_proc_raise_args {
+	char sig_l_[PADL_(cloudabi_signal_t)]; cloudabi_signal_t sig; char sig_r_[PADR_(cloudabi_signal_t)];
+};
+struct cloudabi_sys_random_get_args {
+	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
+	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_sock_accept_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)];
+};
+struct cloudabi_sys_sock_bind_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_sock_connect_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char fd_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t fd; char fd_r_[PADR_(cloudabi_fd_t)];
+	char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)];
+	char pathlen_l_[PADL_(size_t)]; size_t pathlen; char pathlen_r_[PADR_(size_t)];
+};
+struct cloudabi_sys_sock_listen_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char backlog_l_[PADL_(cloudabi_backlog_t)]; cloudabi_backlog_t backlog; char backlog_r_[PADR_(cloudabi_backlog_t)];
+};
+struct cloudabi32_sys_sock_recv_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char in_l_[PADL_(const cloudabi32_recv_in_t *)]; const cloudabi32_recv_in_t * in; char in_r_[PADR_(const cloudabi32_recv_in_t *)];
+	char out_l_[PADL_(cloudabi32_recv_out_t *)]; cloudabi32_recv_out_t * out; char out_r_[PADR_(cloudabi32_recv_out_t *)];
+};
+struct cloudabi32_sys_sock_send_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char in_l_[PADL_(const cloudabi32_send_in_t *)]; const cloudabi32_send_in_t * in; char in_r_[PADR_(const cloudabi32_send_in_t *)];
+	char out_l_[PADL_(cloudabi32_send_out_t *)]; cloudabi32_send_out_t * out; char out_r_[PADR_(cloudabi32_send_out_t *)];
+};
+struct cloudabi_sys_sock_shutdown_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char how_l_[PADL_(cloudabi_sdflags_t)]; cloudabi_sdflags_t how; char how_r_[PADR_(cloudabi_sdflags_t)];
+};
+struct cloudabi_sys_sock_stat_get_args {
+	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
+	char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)];
+	char flags_l_[PADL_(cloudabi_ssflags_t)]; cloudabi_ssflags_t flags; char flags_r_[PADR_(cloudabi_ssflags_t)];
+};
+struct cloudabi32_sys_thread_create_args {
+	char attr_l_[PADL_(cloudabi32_threadattr_t *)]; cloudabi32_threadattr_t * attr; char attr_r_[PADR_(cloudabi32_threadattr_t *)];
+};
+struct cloudabi_sys_thread_exit_args {
+	char lock_l_[PADL_(cloudabi_lock_t *)]; cloudabi_lock_t * lock; char lock_r_[PADR_(cloudabi_lock_t *)];
+	char scope_l_[PADL_(cloudabi_scope_t)]; cloudabi_scope_t scope; char scope_r_[PADR_(cloudabi_scope_t)];
+};
+struct cloudabi_sys_thread_yield_args {
+	register_t dummy;
+};
+int	cloudabi_sys_clock_res_get(struct thread *, struct cloudabi_sys_clock_res_get_args *);
+int	cloudabi_sys_clock_time_get(struct thread *, struct cloudabi_sys_clock_time_get_args *);
+int	cloudabi_sys_condvar_signal(struct thread *, struct cloudabi_sys_condvar_signal_args *);
+int	cloudabi_sys_fd_close(struct thread *, struct cloudabi_sys_fd_close_args *);
+int	cloudabi_sys_fd_create1(struct thread *, struct cloudabi_sys_fd_create1_args *);
+int	cloudabi_sys_fd_create2(struct thread *, struct cloudabi_sys_fd_create2_args *);
+int	cloudabi_sys_fd_datasync(struct thread *, struct cloudabi_sys_fd_datasync_args *);
+int	cloudabi_sys_fd_dup(struct thread *, struct cloudabi_sys_fd_dup_args *);
+int	cloudabi32_sys_fd_pread(struct thread *, struct cloudabi32_sys_fd_pread_args *);
+int	cloudabi32_sys_fd_pwrite(struct thread *, struct cloudabi32_sys_fd_pwrite_args *);
+int	cloudabi32_sys_fd_read(struct thread *, struct cloudabi32_sys_fd_read_args *);
+int	cloudabi_sys_fd_replace(struct thread *, struct cloudabi_sys_fd_replace_args *);
+int	cloudabi_sys_fd_seek(struct thread *, struct cloudabi_sys_fd_seek_args *);
+int	cloudabi_sys_fd_stat_get(struct thread *, struct cloudabi_sys_fd_stat_get_args *);
+int	cloudabi_sys_fd_stat_put(struct thread *, struct cloudabi_sys_fd_stat_put_args *);
+int	cloudabi_sys_fd_sync(struct thread *, struct cloudabi_sys_fd_sync_args *);
+int	cloudabi32_sys_fd_write(struct thread *, struct cloudabi32_sys_fd_write_args *);
+int	cloudabi_sys_file_advise(struct thread *, struct cloudabi_sys_file_advise_args *);
+int	cloudabi_sys_file_allocate(struct thread *, struct cloudabi_sys_file_allocate_args *);
+int	cloudabi_sys_file_create(struct thread *, struct cloudabi_sys_file_create_args *);
+int	cloudabi_sys_file_link(struct thread *, struct cloudabi_sys_file_link_args *);
+int	cloudabi_sys_file_open(struct thread *, struct cloudabi_sys_file_open_args *);
+int	cloudabi_sys_file_readdir(struct thread *, struct cloudabi_sys_file_readdir_args *);
+int	cloudabi_sys_file_readlink(struct thread *, struct cloudabi_sys_file_readlink_args *);
+int	cloudabi_sys_file_rename(struct thread *, struct cloudabi_sys_file_rename_args *);
+int	cloudabi_sys_file_stat_fget(struct thread *, struct cloudabi_sys_file_stat_fget_args *);
+int	cloudabi_sys_file_stat_fput(struct thread *, struct cloudabi_sys_file_stat_fput_args *);
+int	cloudabi_sys_file_stat_get(struct thread *, struct cloudabi_sys_file_stat_get_args *);
+int	cloudabi_sys_file_stat_put(struct thread *, struct cloudabi_sys_file_stat_put_args *);
+int	cloudabi_sys_file_symlink(struct thread *, struct cloudabi_sys_file_symlink_args *);
+int	cloudabi_sys_file_unlink(struct thread *, struct cloudabi_sys_file_unlink_args *);
+int	cloudabi_sys_lock_unlock(struct thread *, struct cloudabi_sys_lock_unlock_args *);
+int	cloudabi_sys_mem_advise(struct thread *, struct cloudabi_sys_mem_advise_args *);
+int	cloudabi_sys_mem_lock(struct thread *, struct cloudabi_sys_mem_lock_args *);
+int	cloudabi_sys_mem_map(struct thread *, struct cloudabi_sys_mem_map_args *);
+int	cloudabi_sys_mem_protect(struct thread *, struct cloudabi_sys_mem_protect_args *);
+int	cloudabi_sys_mem_sync(struct thread *, struct cloudabi_sys_mem_sync_args *);
+int	cloudabi_sys_mem_unlock(struct thread *, struct cloudabi_sys_mem_unlock_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 *);
+int	cloudabi_sys_proc_raise(struct thread *, struct cloudabi_sys_proc_raise_args *);
+int	cloudabi_sys_random_get(struct thread *, struct cloudabi_sys_random_get_args *);
+int	cloudabi_sys_sock_accept(struct thread *, struct cloudabi_sys_sock_accept_args *);
+int	cloudabi_sys_sock_bind(struct thread *, struct cloudabi_sys_sock_bind_args *);
+int	cloudabi_sys_sock_connect(struct thread *, struct cloudabi_sys_sock_connect_args *);
+int	cloudabi_sys_sock_listen(struct thread *, struct cloudabi_sys_sock_listen_args *);
+int	cloudabi32_sys_sock_recv(struct thread *, struct cloudabi32_sys_sock_recv_args *);
+int	cloudabi32_sys_sock_send(struct thread *, struct cloudabi32_sys_sock_send_args *);
+int	cloudabi_sys_sock_shutdown(struct thread *, struct cloudabi_sys_sock_shutdown_args *);
+int	cloudabi_sys_sock_stat_get(struct thread *, struct cloudabi_sys_sock_stat_get_args *);
+int	cloudabi32_sys_thread_create(struct thread *, struct cloudabi32_sys_thread_create_args *);
+int	cloudabi_sys_thread_exit(struct thread *, struct cloudabi_sys_thread_exit_args *);
+int	cloudabi_sys_thread_yield(struct thread *, struct cloudabi_sys_thread_yield_args *);
+
+#ifdef COMPAT_43
+
+
+#endif /* COMPAT_43 */
+
+
+#ifdef COMPAT_FREEBSD4
+
+
+#endif /* COMPAT_FREEBSD4 */
+
+
+#ifdef COMPAT_FREEBSD6
+
+
+#endif /* COMPAT_FREEBSD6 */
+
+
+#ifdef COMPAT_FREEBSD7
+
+
+#endif /* COMPAT_FREEBSD7 */
+
+
+#ifdef COMPAT_FREEBSD10
+
+
+#endif /* COMPAT_FREEBSD10 */
+
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_clock_res_get	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_clock_time_get	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_condvar_signal	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_close	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_create1	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_create2	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_datasync	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_dup	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_fd_pread	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_fd_pwrite	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_fd_read	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_replace	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_seek	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_stat_get	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_stat_put	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_fd_sync	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_fd_write	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_advise	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_allocate	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_create	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_link	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_open	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_readdir	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_readlink	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_rename	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_stat_fget	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_stat_fput	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_stat_get	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_stat_put	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_symlink	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_unlink	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_lock_unlock	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_advise	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_lock	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_map	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_protect	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_sync	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_unlock	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
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_proc_raise	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_random_get	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_accept	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_bind	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_connect	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_listen	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_sock_recv	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_sock_send	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_shutdown	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_sock_stat_get	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi32_sys_thread_create	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_thread_exit	AUE_NULL
+#define	CLOUDABI32_SYS_AUE_cloudabi_sys_thread_yield	AUE_NULL
+
+#undef PAD_
+#undef PADL_
+#undef PADR_
+
+#endif /* !_CLOUDABI32_SYSPROTO_H_ */

Added: head/sys/compat/cloudabi32/cloudabi32_syscall.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/compat/cloudabi32/cloudabi32_syscall.h	Sun Aug 21 16:02:25 2016	(r304565)
@@ -0,0 +1,66 @@
+/*
+ * System call numbers.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed 
+ */
+
+#define	CLOUDABI32_SYS_cloudabi_sys_clock_res_get	0
+#define	CLOUDABI32_SYS_cloudabi_sys_clock_time_get	1
+#define	CLOUDABI32_SYS_cloudabi_sys_condvar_signal	2
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_close	3
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_create1	4
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_create2	5
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_datasync	6
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_dup	7
+#define	CLOUDABI32_SYS_cloudabi32_sys_fd_pread	8
+#define	CLOUDABI32_SYS_cloudabi32_sys_fd_pwrite	9
+#define	CLOUDABI32_SYS_cloudabi32_sys_fd_read	10
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_replace	11
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_seek	12
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_stat_get	13
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_stat_put	14
+#define	CLOUDABI32_SYS_cloudabi_sys_fd_sync	15
+#define	CLOUDABI32_SYS_cloudabi32_sys_fd_write	16
+#define	CLOUDABI32_SYS_cloudabi_sys_file_advise	17
+#define	CLOUDABI32_SYS_cloudabi_sys_file_allocate	18
+#define	CLOUDABI32_SYS_cloudabi_sys_file_create	19
+#define	CLOUDABI32_SYS_cloudabi_sys_file_link	20
+#define	CLOUDABI32_SYS_cloudabi_sys_file_open	21
+#define	CLOUDABI32_SYS_cloudabi_sys_file_readdir	22
+#define	CLOUDABI32_SYS_cloudabi_sys_file_readlink	23
+#define	CLOUDABI32_SYS_cloudabi_sys_file_rename	24
+#define	CLOUDABI32_SYS_cloudabi_sys_file_stat_fget	25
+#define	CLOUDABI32_SYS_cloudabi_sys_file_stat_fput	26
+#define	CLOUDABI32_SYS_cloudabi_sys_file_stat_get	27
+#define	CLOUDABI32_SYS_cloudabi_sys_file_stat_put	28
+#define	CLOUDABI32_SYS_cloudabi_sys_file_symlink	29
+#define	CLOUDABI32_SYS_cloudabi_sys_file_unlink	30
+#define	CLOUDABI32_SYS_cloudabi_sys_lock_unlock	31
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_advise	32
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_lock	33
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_map	34
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_protect	35
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_sync	36
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_unlock	37
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_unmap	38
+#define	CLOUDABI32_SYS_cloudabi32_sys_poll	39
+#define	CLOUDABI32_SYS_cloudabi32_sys_poll_fd	40
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_exec	41
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_exit	42
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_fork	43
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_raise	44
+#define	CLOUDABI32_SYS_cloudabi_sys_random_get	45
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_accept	46
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_bind	47
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_connect	48
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_listen	49
+#define	CLOUDABI32_SYS_cloudabi32_sys_sock_recv	50
+#define	CLOUDABI32_SYS_cloudabi32_sys_sock_send	51
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_shutdown	52
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_stat_get	53
+#define	CLOUDABI32_SYS_cloudabi32_sys_thread_create	54
+#define	CLOUDABI32_SYS_cloudabi_sys_thread_exit	55
+#define	CLOUDABI32_SYS_cloudabi_sys_thread_yield	56
+#define	CLOUDABI32_SYS_MAXSYSCALL	57

Added: head/sys/compat/cloudabi32/cloudabi32_syscalls.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/compat/cloudabi32/cloudabi32_syscalls.c	Sun Aug 21 16:02:25 2016	(r304565)
@@ -0,0 +1,67 @@
+/*
+ * System call names.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed 
+ */
+
+const char *cloudabi32_syscallnames[] = {
+	"cloudabi_sys_clock_res_get",			/* 0 = cloudabi_sys_clock_res_get */
+	"cloudabi_sys_clock_time_get",			/* 1 = cloudabi_sys_clock_time_get */
+	"cloudabi_sys_condvar_signal",			/* 2 = cloudabi_sys_condvar_signal */
+	"cloudabi_sys_fd_close",			/* 3 = cloudabi_sys_fd_close */
+	"cloudabi_sys_fd_create1",			/* 4 = cloudabi_sys_fd_create1 */
+	"cloudabi_sys_fd_create2",			/* 5 = cloudabi_sys_fd_create2 */
+	"cloudabi_sys_fd_datasync",			/* 6 = cloudabi_sys_fd_datasync */
+	"cloudabi_sys_fd_dup",			/* 7 = cloudabi_sys_fd_dup */
+	"cloudabi32_sys_fd_pread",			/* 8 = cloudabi32_sys_fd_pread */
+	"cloudabi32_sys_fd_pwrite",			/* 9 = cloudabi32_sys_fd_pwrite */
+	"cloudabi32_sys_fd_read",			/* 10 = cloudabi32_sys_fd_read */
+	"cloudabi_sys_fd_replace",			/* 11 = cloudabi_sys_fd_replace */
+	"cloudabi_sys_fd_seek",			/* 12 = cloudabi_sys_fd_seek */
+	"cloudabi_sys_fd_stat_get",			/* 13 = cloudabi_sys_fd_stat_get */
+	"cloudabi_sys_fd_stat_put",			/* 14 = cloudabi_sys_fd_stat_put */
+	"cloudabi_sys_fd_sync",			/* 15 = cloudabi_sys_fd_sync */
+	"cloudabi32_sys_fd_write",			/* 16 = cloudabi32_sys_fd_write */
+	"cloudabi_sys_file_advise",			/* 17 = cloudabi_sys_file_advise */
+	"cloudabi_sys_file_allocate",			/* 18 = cloudabi_sys_file_allocate */
+	"cloudabi_sys_file_create",			/* 19 = cloudabi_sys_file_create */
+	"cloudabi_sys_file_link",			/* 20 = cloudabi_sys_file_link */
+	"cloudabi_sys_file_open",			/* 21 = cloudabi_sys_file_open */
+	"cloudabi_sys_file_readdir",			/* 22 = cloudabi_sys_file_readdir */
+	"cloudabi_sys_file_readlink",			/* 23 = cloudabi_sys_file_readlink */
+	"cloudabi_sys_file_rename",			/* 24 = cloudabi_sys_file_rename */
+	"cloudabi_sys_file_stat_fget",			/* 25 = cloudabi_sys_file_stat_fget */
+	"cloudabi_sys_file_stat_fput",			/* 26 = cloudabi_sys_file_stat_fput */
+	"cloudabi_sys_file_stat_get",			/* 27 = cloudabi_sys_file_stat_get */
+	"cloudabi_sys_file_stat_put",			/* 28 = cloudabi_sys_file_stat_put */
+	"cloudabi_sys_file_symlink",			/* 29 = cloudabi_sys_file_symlink */
+	"cloudabi_sys_file_unlink",			/* 30 = cloudabi_sys_file_unlink */
+	"cloudabi_sys_lock_unlock",			/* 31 = cloudabi_sys_lock_unlock */
+	"cloudabi_sys_mem_advise",			/* 32 = cloudabi_sys_mem_advise */
+	"cloudabi_sys_mem_lock",			/* 33 = cloudabi_sys_mem_lock */
+	"cloudabi_sys_mem_map",			/* 34 = cloudabi_sys_mem_map */
+	"cloudabi_sys_mem_protect",			/* 35 = cloudabi_sys_mem_protect */
+	"cloudabi_sys_mem_sync",			/* 36 = cloudabi_sys_mem_sync */
+	"cloudabi_sys_mem_unlock",			/* 37 = cloudabi_sys_mem_unlock */
+	"cloudabi_sys_mem_unmap",			/* 38 = cloudabi_sys_mem_unmap */
+	"cloudabi32_sys_poll",			/* 39 = cloudabi32_sys_poll */
+	"cloudabi32_sys_poll_fd",			/* 40 = cloudabi32_sys_poll_fd */
+	"cloudabi_sys_proc_exec",			/* 41 = cloudabi_sys_proc_exec */
+	"cloudabi_sys_proc_exit",			/* 42 = cloudabi_sys_proc_exit */
+	"cloudabi_sys_proc_fork",			/* 43 = cloudabi_sys_proc_fork */
+	"cloudabi_sys_proc_raise",			/* 44 = cloudabi_sys_proc_raise */
+	"cloudabi_sys_random_get",			/* 45 = cloudabi_sys_random_get */
+	"cloudabi_sys_sock_accept",			/* 46 = cloudabi_sys_sock_accept */
+	"cloudabi_sys_sock_bind",			/* 47 = cloudabi_sys_sock_bind */
+	"cloudabi_sys_sock_connect",			/* 48 = cloudabi_sys_sock_connect */
+	"cloudabi_sys_sock_listen",			/* 49 = cloudabi_sys_sock_listen */
+	"cloudabi32_sys_sock_recv",			/* 50 = cloudabi32_sys_sock_recv */
+	"cloudabi32_sys_sock_send",			/* 51 = cloudabi32_sys_sock_send */
+	"cloudabi_sys_sock_shutdown",			/* 52 = cloudabi_sys_sock_shutdown */
+	"cloudabi_sys_sock_stat_get",			/* 53 = cloudabi_sys_sock_stat_get */
+	"cloudabi32_sys_thread_create",			/* 54 = cloudabi32_sys_thread_create */
+	"cloudabi_sys_thread_exit",			/* 55 = cloudabi_sys_thread_exit */
+	"cloudabi_sys_thread_yield",			/* 56 = cloudabi_sys_thread_yield */
+};

Added: head/sys/compat/cloudabi32/cloudabi32_sysent.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/compat/cloudabi32/cloudabi32_sysent.c	Sun Aug 21 16:02:25 2016	(r304565)
@@ -0,0 +1,75 @@
+/*
+ * System call switch table.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 304563 2016-08-21 15:56:19Z ed 
+ */
+
+#include <sys/sysent.h>
+#include <sys/sysproto.h>
+#include <contrib/cloudabi/cloudabi32_types.h>
+#include <compat/cloudabi32/cloudabi32_proto.h>
+
+#define AS(name) (sizeof(struct name) / sizeof(register_t))
+
+/* The casts are bogus but will do for now. */
+struct sysent cloudabi32_sysent[] = {
+	{ AS(cloudabi_sys_clock_res_get_args), (sy_call_t *)cloudabi_sys_clock_res_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 0 = cloudabi_sys_clock_res_get */
+	{ AS(cloudabi_sys_clock_time_get_args), (sy_call_t *)cloudabi_sys_clock_time_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 1 = cloudabi_sys_clock_time_get */
+	{ AS(cloudabi_sys_condvar_signal_args), (sy_call_t *)cloudabi_sys_condvar_signal, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 2 = cloudabi_sys_condvar_signal */
+	{ AS(cloudabi_sys_fd_close_args), (sy_call_t *)cloudabi_sys_fd_close, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 3 = cloudabi_sys_fd_close */
+	{ AS(cloudabi_sys_fd_create1_args), (sy_call_t *)cloudabi_sys_fd_create1, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 4 = cloudabi_sys_fd_create1 */
+	{ AS(cloudabi_sys_fd_create2_args), (sy_call_t *)cloudabi_sys_fd_create2, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 5 = cloudabi_sys_fd_create2 */
+	{ AS(cloudabi_sys_fd_datasync_args), (sy_call_t *)cloudabi_sys_fd_datasync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 6 = cloudabi_sys_fd_datasync */
+	{ AS(cloudabi_sys_fd_dup_args), (sy_call_t *)cloudabi_sys_fd_dup, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 7 = cloudabi_sys_fd_dup */
+	{ AS(cloudabi32_sys_fd_pread_args), (sy_call_t *)cloudabi32_sys_fd_pread, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 8 = cloudabi32_sys_fd_pread */
+	{ AS(cloudabi32_sys_fd_pwrite_args), (sy_call_t *)cloudabi32_sys_fd_pwrite, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 9 = cloudabi32_sys_fd_pwrite */
+	{ AS(cloudabi32_sys_fd_read_args), (sy_call_t *)cloudabi32_sys_fd_read, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 10 = cloudabi32_sys_fd_read */
+	{ AS(cloudabi_sys_fd_replace_args), (sy_call_t *)cloudabi_sys_fd_replace, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 11 = cloudabi_sys_fd_replace */
+	{ AS(cloudabi_sys_fd_seek_args), (sy_call_t *)cloudabi_sys_fd_seek, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 12 = cloudabi_sys_fd_seek */
+	{ AS(cloudabi_sys_fd_stat_get_args), (sy_call_t *)cloudabi_sys_fd_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 13 = cloudabi_sys_fd_stat_get */
+	{ AS(cloudabi_sys_fd_stat_put_args), (sy_call_t *)cloudabi_sys_fd_stat_put, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 14 = cloudabi_sys_fd_stat_put */
+	{ AS(cloudabi_sys_fd_sync_args), (sy_call_t *)cloudabi_sys_fd_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 15 = cloudabi_sys_fd_sync */
+	{ AS(cloudabi32_sys_fd_write_args), (sy_call_t *)cloudabi32_sys_fd_write, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 16 = cloudabi32_sys_fd_write */
+	{ AS(cloudabi_sys_file_advise_args), (sy_call_t *)cloudabi_sys_file_advise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 17 = cloudabi_sys_file_advise */
+	{ AS(cloudabi_sys_file_allocate_args), (sy_call_t *)cloudabi_sys_file_allocate, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 18 = cloudabi_sys_file_allocate */
+	{ AS(cloudabi_sys_file_create_args), (sy_call_t *)cloudabi_sys_file_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 19 = cloudabi_sys_file_create */
+	{ AS(cloudabi_sys_file_link_args), (sy_call_t *)cloudabi_sys_file_link, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 20 = cloudabi_sys_file_link */
+	{ AS(cloudabi_sys_file_open_args), (sy_call_t *)cloudabi_sys_file_open, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 21 = cloudabi_sys_file_open */
+	{ AS(cloudabi_sys_file_readdir_args), (sy_call_t *)cloudabi_sys_file_readdir, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 22 = cloudabi_sys_file_readdir */
+	{ AS(cloudabi_sys_file_readlink_args), (sy_call_t *)cloudabi_sys_file_readlink, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 23 = cloudabi_sys_file_readlink */
+	{ AS(cloudabi_sys_file_rename_args), (sy_call_t *)cloudabi_sys_file_rename, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 24 = cloudabi_sys_file_rename */
+	{ AS(cloudabi_sys_file_stat_fget_args), (sy_call_t *)cloudabi_sys_file_stat_fget, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 25 = cloudabi_sys_file_stat_fget */
+	{ AS(cloudabi_sys_file_stat_fput_args), (sy_call_t *)cloudabi_sys_file_stat_fput, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 26 = cloudabi_sys_file_stat_fput */
+	{ AS(cloudabi_sys_file_stat_get_args), (sy_call_t *)cloudabi_sys_file_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 27 = cloudabi_sys_file_stat_get */
+	{ AS(cloudabi_sys_file_stat_put_args), (sy_call_t *)cloudabi_sys_file_stat_put, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 28 = cloudabi_sys_file_stat_put */
+	{ AS(cloudabi_sys_file_symlink_args), (sy_call_t *)cloudabi_sys_file_symlink, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 29 = cloudabi_sys_file_symlink */
+	{ AS(cloudabi_sys_file_unlink_args), (sy_call_t *)cloudabi_sys_file_unlink, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 30 = cloudabi_sys_file_unlink */
+	{ AS(cloudabi_sys_lock_unlock_args), (sy_call_t *)cloudabi_sys_lock_unlock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 31 = cloudabi_sys_lock_unlock */
+	{ AS(cloudabi_sys_mem_advise_args), (sy_call_t *)cloudabi_sys_mem_advise, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 32 = cloudabi_sys_mem_advise */
+	{ AS(cloudabi_sys_mem_lock_args), (sy_call_t *)cloudabi_sys_mem_lock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 33 = cloudabi_sys_mem_lock */
+	{ AS(cloudabi_sys_mem_map_args), (sy_call_t *)cloudabi_sys_mem_map, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 34 = cloudabi_sys_mem_map */
+	{ AS(cloudabi_sys_mem_protect_args), (sy_call_t *)cloudabi_sys_mem_protect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 35 = cloudabi_sys_mem_protect */
+	{ AS(cloudabi_sys_mem_sync_args), (sy_call_t *)cloudabi_sys_mem_sync, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 36 = cloudabi_sys_mem_sync */
+	{ AS(cloudabi_sys_mem_unlock_args), (sy_call_t *)cloudabi_sys_mem_unlock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 37 = cloudabi_sys_mem_unlock */
+	{ AS(cloudabi_sys_mem_unmap_args), (sy_call_t *)cloudabi_sys_mem_unmap, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 38 = 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 },	/* 39 = 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 },	/* 40 = 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 },	/* 41 = 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 },	/* 42 = cloudabi_sys_proc_exit */
+	{ 0, (sy_call_t *)cloudabi_sys_proc_fork, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 43 = 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 },	/* 44 = 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 },	/* 45 = cloudabi_sys_random_get */
+	{ AS(cloudabi_sys_sock_accept_args), (sy_call_t *)cloudabi_sys_sock_accept, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 46 = cloudabi_sys_sock_accept */
+	{ AS(cloudabi_sys_sock_bind_args), (sy_call_t *)cloudabi_sys_sock_bind, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 47 = cloudabi_sys_sock_bind */
+	{ AS(cloudabi_sys_sock_connect_args), (sy_call_t *)cloudabi_sys_sock_connect, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 48 = cloudabi_sys_sock_connect */
+	{ AS(cloudabi_sys_sock_listen_args), (sy_call_t *)cloudabi_sys_sock_listen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 49 = cloudabi_sys_sock_listen */
+	{ AS(cloudabi32_sys_sock_recv_args), (sy_call_t *)cloudabi32_sys_sock_recv, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 50 = 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 },	/* 51 = 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 },	/* 52 = cloudabi_sys_sock_shutdown */
+	{ AS(cloudabi_sys_sock_stat_get_args), (sy_call_t *)cloudabi_sys_sock_stat_get, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 53 = cloudabi_sys_sock_stat_get */
+	{ AS(cloudabi32_sys_thread_create_args), (sy_call_t *)cloudabi32_sys_thread_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 54 = 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 },	/* 55 = cloudabi_sys_thread_exit */
+	{ 0, (sy_call_t *)cloudabi_sys_thread_yield, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 56 = cloudabi_sys_thread_yield */
+};

Added: head/sys/compat/cloudabi32/cloudabi32_systrace_args.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/compat/cloudabi32/cloudabi32_systrace_args.c	Sun Aug 21 16:02:25 2016	(r304565)
@@ -0,0 +1,1702 @@
+/*
+ * System call argument to DTrace register array converstion.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * This file is part of the DTrace syscall provider.
+ */
+
+static void
+systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
+{
+	int64_t *iarg  = (int64_t *) uarg;
+	switch (sysnum) {
+	/* cloudabi_sys_clock_res_get */
+	case 0: {
+		struct cloudabi_sys_clock_res_get_args *p = params;
+		iarg[0] = p->clock_id; /* cloudabi_clockid_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi_sys_clock_time_get */
+	case 1: {
+		struct cloudabi_sys_clock_time_get_args *p = params;
+		iarg[0] = p->clock_id; /* cloudabi_clockid_t */
+		iarg[1] = p->precision; /* cloudabi_timestamp_t */
+		*n_args = 2;
+		break;
+	}
+	/* cloudabi_sys_condvar_signal */
+	case 2: {
+		struct cloudabi_sys_condvar_signal_args *p = params;
+		uarg[0] = (intptr_t) p->condvar; /* cloudabi_condvar_t * */
+		iarg[1] = p->scope; /* cloudabi_scope_t */
+		iarg[2] = p->nwaiters; /* cloudabi_nthreads_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_fd_close */
+	case 3: {
+		struct cloudabi_sys_fd_close_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi_sys_fd_create1 */
+	case 4: {
+		struct cloudabi_sys_fd_create1_args *p = params;
+		iarg[0] = p->type; /* cloudabi_filetype_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi_sys_fd_create2 */
+	case 5: {
+		struct cloudabi_sys_fd_create2_args *p = params;
+		iarg[0] = p->type; /* cloudabi_filetype_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi_sys_fd_datasync */
+	case 6: {
+		struct cloudabi_sys_fd_datasync_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi_sys_fd_dup */
+	case 7: {
+		struct cloudabi_sys_fd_dup_args *p = params;
+		iarg[0] = p->from; /* cloudabi_fd_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi32_sys_fd_pread */
+	case 8: {
+		struct cloudabi32_sys_fd_pread_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->iov; /* const cloudabi32_iovec_t * */
+		uarg[2] = p->iovcnt; /* size_t */
+		iarg[3] = p->offset; /* cloudabi_filesize_t */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi32_sys_fd_pwrite */
+	case 9: {
+		struct cloudabi32_sys_fd_pwrite_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->iov; /* const cloudabi32_ciovec_t * */
+		uarg[2] = p->iovcnt; /* size_t */
+		iarg[3] = p->offset; /* cloudabi_filesize_t */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi32_sys_fd_read */
+	case 10: {
+		struct cloudabi32_sys_fd_read_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->iov; /* const cloudabi32_iovec_t * */
+		uarg[2] = p->iovcnt; /* size_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_fd_replace */
+	case 11: {
+		struct cloudabi_sys_fd_replace_args *p = params;
+		iarg[0] = p->from; /* cloudabi_fd_t */
+		iarg[1] = p->to; /* cloudabi_fd_t */
+		*n_args = 2;
+		break;
+	}
+	/* cloudabi_sys_fd_seek */
+	case 12: {
+		struct cloudabi_sys_fd_seek_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		iarg[1] = p->offset; /* cloudabi_filedelta_t */
+		iarg[2] = p->whence; /* cloudabi_whence_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_fd_stat_get */
+	case 13: {
+		struct cloudabi_sys_fd_stat_get_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->buf; /* cloudabi_fdstat_t * */
+		*n_args = 2;
+		break;
+	}
+	/* cloudabi_sys_fd_stat_put */
+	case 14: {
+		struct cloudabi_sys_fd_stat_put_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->buf; /* const cloudabi_fdstat_t * */
+		iarg[2] = p->flags; /* cloudabi_fdsflags_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_fd_sync */
+	case 15: {
+		struct cloudabi_sys_fd_sync_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		*n_args = 1;
+		break;
+	}
+	/* cloudabi32_sys_fd_write */
+	case 16: {
+		struct cloudabi32_sys_fd_write_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->iov; /* const cloudabi32_ciovec_t * */
+		uarg[2] = p->iovcnt; /* size_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_file_advise */
+	case 17: {
+		struct cloudabi_sys_file_advise_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		iarg[1] = p->offset; /* cloudabi_filesize_t */
+		iarg[2] = p->len; /* cloudabi_filesize_t */
+		iarg[3] = p->advice; /* cloudabi_advice_t */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi_sys_file_allocate */
+	case 18: {
+		struct cloudabi_sys_file_allocate_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		iarg[1] = p->offset; /* cloudabi_filesize_t */
+		iarg[2] = p->len; /* cloudabi_filesize_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_file_create */
+	case 19: {
+		struct cloudabi_sys_file_create_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->path; /* const char * */
+		uarg[2] = p->pathlen; /* size_t */
+		iarg[3] = p->type; /* cloudabi_filetype_t */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi_sys_file_link */
+	case 20: {
+		struct cloudabi_sys_file_link_args *p = params;
+		iarg[0] = p->fd1; /* cloudabi_lookup_t */
+		uarg[1] = (intptr_t) p->path1; /* const char * */
+		uarg[2] = p->path1len; /* size_t */
+		iarg[3] = p->fd2; /* cloudabi_fd_t */
+		uarg[4] = (intptr_t) p->path2; /* const char * */
+		uarg[5] = p->path2len; /* size_t */
+		*n_args = 6;
+		break;
+	}
+	/* cloudabi_sys_file_open */
+	case 21: {
+		struct cloudabi_sys_file_open_args *p = params;
+		iarg[0] = p->dirfd; /* cloudabi_lookup_t */
+		uarg[1] = (intptr_t) p->path; /* const char * */
+		uarg[2] = p->pathlen; /* size_t */
+		iarg[3] = p->oflags; /* cloudabi_oflags_t */
+		uarg[4] = (intptr_t) p->fds; /* const cloudabi_fdstat_t * */
+		*n_args = 5;
+		break;
+	}
+	/* cloudabi_sys_file_readdir */
+	case 22: {
+		struct cloudabi_sys_file_readdir_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->buf; /* void * */
+		uarg[2] = p->nbyte; /* size_t */
+		iarg[3] = p->cookie; /* cloudabi_dircookie_t */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi_sys_file_readlink */
+	case 23: {
+		struct cloudabi_sys_file_readlink_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->path; /* const char * */
+		uarg[2] = p->pathlen; /* size_t */
+		uarg[3] = (intptr_t) p->buf; /* char * */
+		uarg[4] = p->bufsize; /* size_t */
+		*n_args = 5;
+		break;
+	}
+	/* cloudabi_sys_file_rename */
+	case 24: {
+		struct cloudabi_sys_file_rename_args *p = params;
+		iarg[0] = p->oldfd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->old; /* const char * */
+		uarg[2] = p->oldlen; /* size_t */
+		iarg[3] = p->newfd; /* cloudabi_fd_t */
+		uarg[4] = (intptr_t) p->new; /* const char * */
+		uarg[5] = p->newlen; /* size_t */
+		*n_args = 6;
+		break;
+	}
+	/* cloudabi_sys_file_stat_fget */
+	case 25: {
+		struct cloudabi_sys_file_stat_fget_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->buf; /* cloudabi_filestat_t * */
+		*n_args = 2;
+		break;
+	}
+	/* cloudabi_sys_file_stat_fput */
+	case 26: {
+		struct cloudabi_sys_file_stat_fput_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->buf; /* const cloudabi_filestat_t * */
+		iarg[2] = p->flags; /* cloudabi_fsflags_t */
+		*n_args = 3;
+		break;
+	}
+	/* cloudabi_sys_file_stat_get */
+	case 27: {
+		struct cloudabi_sys_file_stat_get_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_lookup_t */
+		uarg[1] = (intptr_t) p->path; /* const char * */
+		uarg[2] = p->pathlen; /* size_t */
+		uarg[3] = (intptr_t) p->buf; /* cloudabi_filestat_t * */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi_sys_file_stat_put */
+	case 28: {
+		struct cloudabi_sys_file_stat_put_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_lookup_t */
+		uarg[1] = (intptr_t) p->path; /* const char * */
+		uarg[2] = p->pathlen; /* size_t */
+		uarg[3] = (intptr_t) p->buf; /* const cloudabi_filestat_t * */
+		iarg[4] = p->flags; /* cloudabi_fsflags_t */
+		*n_args = 5;
+		break;
+	}
+	/* cloudabi_sys_file_symlink */
+	case 29: {
+		struct cloudabi_sys_file_symlink_args *p = params;
+		uarg[0] = (intptr_t) p->path1; /* const char * */
+		uarg[1] = p->path1len; /* size_t */
+		iarg[2] = p->fd; /* cloudabi_fd_t */
+		uarg[3] = (intptr_t) p->path2; /* const char * */
+		uarg[4] = p->path2len; /* size_t */
+		*n_args = 5;
+		break;
+	}
+	/* cloudabi_sys_file_unlink */
+	case 30: {
+		struct cloudabi_sys_file_unlink_args *p = params;
+		iarg[0] = p->fd; /* cloudabi_fd_t */
+		uarg[1] = (intptr_t) p->path; /* const char * */
+		uarg[2] = p->pathlen; /* size_t */
+		iarg[3] = p->flags; /* cloudabi_ulflags_t */
+		*n_args = 4;
+		break;
+	}
+	/* cloudabi_sys_lock_unlock */
+	case 31: {
+		struct cloudabi_sys_lock_unlock_args *p = params;
+		uarg[0] = (intptr_t) p->lock; /* cloudabi_lock_t * */
+		iarg[1] = p->scope; /* cloudabi_scope_t */
+		*n_args = 2;
+		break;
+	}
+	/* cloudabi_sys_mem_advise */
+	case 32: {
+		struct cloudabi_sys_mem_advise_args *p = params;
+		uarg[0] = (intptr_t) p->addr; /* void * */
+		uarg[1] = p->len; /* size_t */
+		iarg[2] = p->advice; /* cloudabi_advice_t */
+		*n_args = 3;
+		break;
+	}

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608211602.u7LG2PiA063764>