summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2017-04-06 15:10:36 +0000
committered <ed@FreeBSD.org>2017-04-06 15:10:36 +0000
commit9a92d335245044a13a361c9927ac09113ff68488 (patch)
tree12314ff4954fa44cc6fd589d1373fc79e7f5cd64 /sys/contrib
parent8575dbd2dd357f966f2adfcda71f98f1f8992fe1 (diff)
downloadFreeBSD-src-9a92d335245044a13a361c9927ac09113ff68488.zip
FreeBSD-src-9a92d335245044a13a361c9927ac09113ff68488.tar.gz
Bring kernel space CloudABI code in sync with HEAD.
MFC r312353, r312354 and r312355: Sync in the latest CloudABI generated source files. Languages like C++17 and Go provide direct support for slice types: pointer/length pairs. The CloudABI generator now has more complete for this, meaning that for the C binding, pointer/length pairs now use an automatic naming scheme of ${name} and ${name}_len. Apart from this change and some reformatting, the ABI definitions are identical. Binary compatibility is preserved entirely. MFC r315700: Make file descriptor passing work for CloudABI's sendmsg(). Reduce the potential amount of code duplication between cloudabi32 and cloudabi64 by creating a cloudabi_sock_recv() utility function. The cloudabi32 and cloudabi64 modules will then only contain code to convert the iovecs to the native pointer size. In cloudabi_sock_recv(), we can now construct an SCM_RIGHTS cmsghdr in an mbuf and pass that on to kern_sendit(). MFC r315736: Make file descriptor passing for CloudABI's recvmsg() work. Similar to the change for sendmsg(), create a pointer size independent implementation of recvmsg() and let cloudabi32 and cloudabi64 call into it. In case userspace requests one or more file descriptors, call kern_recvit() in such a way that we get the control message headers in an mbuf. Iterate over all of the headers and copy the file descriptors to userspace.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/cloudabi/cloudabi32_types.h36
-rw-r--r--sys/contrib/cloudabi/cloudabi64_types.h173
-rw-r--r--sys/contrib/cloudabi/cloudabi_types_common.h474
-rw-r--r--sys/contrib/cloudabi/syscalls32.master90
-rw-r--r--sys/contrib/cloudabi/syscalls64.master90
5 files changed, 401 insertions, 462 deletions
diff --git a/sys/contrib/cloudabi/cloudabi32_types.h b/sys/contrib/cloudabi/cloudabi32_types.h
index 71d6429..2986e89 100644
--- a/sys/contrib/cloudabi/cloudabi32_types.h
+++ b/sys/contrib/cloudabi/cloudabi32_types.h
@@ -44,11 +44,11 @@ _Static_assert(sizeof(cloudabi32_auxv_t) == 8, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_auxv_t) == 4, "Incorrect layout");
typedef struct {
- _Alignas(4) uint32_t iov_base;
- _Alignas(4) uint32_t iov_len;
+ _Alignas(4) uint32_t buf;
+ _Alignas(4) uint32_t buf_len;
} cloudabi32_ciovec_t;
-_Static_assert(offsetof(cloudabi32_ciovec_t, iov_base) == 0, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_ciovec_t, iov_len) == 4, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_ciovec_t, buf) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_ciovec_t, buf_len) == 4, "Incorrect layout");
_Static_assert(sizeof(cloudabi32_ciovec_t) == 8, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_ciovec_t) == 4, "Incorrect layout");
@@ -94,11 +94,11 @@ _Static_assert(sizeof(cloudabi32_event_t) == 32, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_event_t) == 8, "Incorrect layout");
typedef struct {
- _Alignas(4) uint32_t iov_base;
- _Alignas(4) uint32_t iov_len;
+ _Alignas(4) uint32_t buf;
+ _Alignas(4) uint32_t buf_len;
} cloudabi32_iovec_t;
-_Static_assert(offsetof(cloudabi32_iovec_t, iov_base) == 0, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_iovec_t, iov_len) == 4, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_iovec_t, buf) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_iovec_t, buf_len) == 4, "Incorrect layout");
_Static_assert(sizeof(cloudabi32_iovec_t) == 8, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_iovec_t) == 4, "Incorrect layout");
@@ -106,30 +106,30 @@ typedef void cloudabi32_processentry_t(uint32_t auxv);
typedef struct {
_Alignas(4) uint32_t ri_data;
- _Alignas(4) uint32_t ri_datalen;
+ _Alignas(4) uint32_t ri_data_len;
_Alignas(4) uint32_t ri_fds;
- _Alignas(4) uint32_t ri_fdslen;
+ _Alignas(4) uint32_t ri_fds_len;
_Alignas(2) cloudabi_msgflags_t ri_flags;
} cloudabi32_recv_in_t;
_Static_assert(offsetof(cloudabi32_recv_in_t, ri_data) == 0, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_recv_in_t, ri_datalen) == 4, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_recv_in_t, ri_data_len) == 4, "Incorrect layout");
_Static_assert(offsetof(cloudabi32_recv_in_t, ri_fds) == 8, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_recv_in_t, ri_fdslen) == 12, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_recv_in_t, ri_fds_len) == 12, "Incorrect layout");
_Static_assert(offsetof(cloudabi32_recv_in_t, ri_flags) == 16, "Incorrect layout");
_Static_assert(sizeof(cloudabi32_recv_in_t) == 20, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_recv_in_t) == 4, "Incorrect layout");
typedef struct {
_Alignas(4) uint32_t si_data;
- _Alignas(4) uint32_t si_datalen;
+ _Alignas(4) uint32_t si_data_len;
_Alignas(4) uint32_t si_fds;
- _Alignas(4) uint32_t si_fdslen;
+ _Alignas(4) uint32_t si_fds_len;
_Alignas(2) cloudabi_msgflags_t si_flags;
} cloudabi32_send_in_t;
_Static_assert(offsetof(cloudabi32_send_in_t, si_data) == 0, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_send_in_t, si_datalen) == 4, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_send_in_t, si_data_len) == 4, "Incorrect layout");
_Static_assert(offsetof(cloudabi32_send_in_t, si_fds) == 8, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_send_in_t, si_fdslen) == 12, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_send_in_t, si_fds_len) == 12, "Incorrect layout");
_Static_assert(offsetof(cloudabi32_send_in_t, si_flags) == 16, "Incorrect layout");
_Static_assert(sizeof(cloudabi32_send_in_t) == 20, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_send_in_t) == 4, "Incorrect layout");
@@ -219,12 +219,12 @@ _Static_assert(_Alignof(cloudabi32_recv_out_t) == 4, "Incorrect layout");
typedef struct {
_Alignas(4) uint32_t entry_point;
_Alignas(4) uint32_t stack;
- _Alignas(4) uint32_t stack_size;
+ _Alignas(4) uint32_t stack_len;
_Alignas(4) uint32_t argument;
} cloudabi32_threadattr_t;
_Static_assert(offsetof(cloudabi32_threadattr_t, entry_point) == 0, "Incorrect layout");
_Static_assert(offsetof(cloudabi32_threadattr_t, stack) == 4, "Incorrect layout");
-_Static_assert(offsetof(cloudabi32_threadattr_t, stack_size) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi32_threadattr_t, stack_len) == 8, "Incorrect layout");
_Static_assert(offsetof(cloudabi32_threadattr_t, argument) == 12, "Incorrect layout");
_Static_assert(sizeof(cloudabi32_threadattr_t) == 16, "Incorrect layout");
_Static_assert(_Alignof(cloudabi32_threadattr_t) == 4, "Incorrect layout");
diff --git a/sys/contrib/cloudabi/cloudabi64_types.h b/sys/contrib/cloudabi/cloudabi64_types.h
index 5d54e7e..0a185ac 100644
--- a/sys/contrib/cloudabi/cloudabi64_types.h
+++ b/sys/contrib/cloudabi/cloudabi64_types.h
@@ -44,12 +44,11 @@ _Static_assert(sizeof(cloudabi64_auxv_t) == 16, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_auxv_t) == 8, "Incorrect layout");
typedef struct {
- _Alignas(8) uint64_t iov_base;
- _Alignas(8) uint64_t iov_len;
+ _Alignas(8) uint64_t buf;
+ _Alignas(8) uint64_t buf_len;
} cloudabi64_ciovec_t;
-_Static_assert(offsetof(cloudabi64_ciovec_t, iov_base) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_ciovec_t, iov_len) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_ciovec_t, buf) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_ciovec_t, buf_len) == 8, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_ciovec_t) == 16, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_ciovec_t) == 8, "Incorrect layout");
@@ -82,33 +81,24 @@ typedef struct {
_Static_assert(offsetof(cloudabi64_event_t, userdata) == 0, "Incorrect layout");
_Static_assert(offsetof(cloudabi64_event_t, error) == 8, "Incorrect layout");
_Static_assert(offsetof(cloudabi64_event_t, type) == 10, "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, clock.identifier) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, condvar.condvar) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.nbytes) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.fd) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.flags) == 28,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, lock.lock) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.fd) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.signal) == 20,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.exitcode) == 24,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, clock.identifier) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, condvar.condvar) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.nbytes) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.fd) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, fd_readwrite.flags) == 28, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, lock.lock) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.fd) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.signal) == 20, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_event_t, proc_terminate.exitcode) == 24, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_event_t) == 32, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_event_t) == 8, "Incorrect layout");
typedef struct {
- _Alignas(8) uint64_t iov_base;
- _Alignas(8) uint64_t iov_len;
+ _Alignas(8) uint64_t buf;
+ _Alignas(8) uint64_t buf_len;
} cloudabi64_iovec_t;
-_Static_assert(offsetof(cloudabi64_iovec_t, iov_base) == 0, "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_iovec_t, iov_len) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_iovec_t, buf) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_iovec_t, buf_len) == 8, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_iovec_t) == 16, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_iovec_t) == 8, "Incorrect layout");
@@ -116,47 +106,38 @@ typedef void cloudabi64_processentry_t(uint64_t auxv);
typedef struct {
_Alignas(8) uint64_t ri_data;
- _Alignas(8) uint64_t ri_datalen;
+ _Alignas(8) uint64_t ri_data_len;
_Alignas(8) uint64_t ri_fds;
- _Alignas(8) uint64_t ri_fdslen;
+ _Alignas(8) uint64_t ri_fds_len;
_Alignas(2) cloudabi_msgflags_t ri_flags;
} cloudabi64_recv_in_t;
-_Static_assert(offsetof(cloudabi64_recv_in_t, ri_data) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_in_t, ri_datalen) == 8,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fds) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fdslen) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_in_t, ri_flags) == 32,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_in_t, ri_data) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_in_t, ri_data_len) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fds) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_in_t, ri_fds_len) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_in_t, ri_flags) == 32, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_recv_in_t) == 40, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_recv_in_t) == 8, "Incorrect layout");
typedef struct {
_Alignas(8) uint64_t si_data;
- _Alignas(8) uint64_t si_datalen;
+ _Alignas(8) uint64_t si_data_len;
_Alignas(8) uint64_t si_fds;
- _Alignas(8) uint64_t si_fdslen;
+ _Alignas(8) uint64_t si_fds_len;
_Alignas(2) cloudabi_msgflags_t si_flags;
} cloudabi64_send_in_t;
-_Static_assert(offsetof(cloudabi64_send_in_t, si_data) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_send_in_t, si_datalen) == 8,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_send_in_t, si_fds) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_send_in_t, si_fdslen) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_send_in_t, si_flags) == 32,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_send_in_t, si_data) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_send_in_t, si_data_len) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_send_in_t, si_fds) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_send_in_t, si_fds_len) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_send_in_t, si_flags) == 32, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_send_in_t) == 40, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_send_in_t) == 8, "Incorrect layout");
-typedef struct { _Alignas(8) uint64_t so_datalen; } cloudabi64_send_out_t;
-_Static_assert(offsetof(cloudabi64_send_out_t, so_datalen) == 0,
- "Incorrect layout");
+typedef struct {
+ _Alignas(8) uint64_t so_datalen;
+} cloudabi64_send_out_t;
+_Static_assert(offsetof(cloudabi64_send_out_t, so_datalen) == 0, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_send_out_t) == 8, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_send_out_t) == 8, "Incorrect layout");
@@ -191,44 +172,29 @@ typedef struct {
} proc_terminate;
};
} cloudabi64_subscription_t;
-_Static_assert(offsetof(cloudabi64_subscription_t, userdata) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, flags) == 8,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, type) == 10,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, clock.identifier) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, clock.clock_id) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, clock.timeout) == 32,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, clock.precision) == 40,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, clock.flags) == 48,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar_scope) == 32,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock_scope) == 33,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.fd) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.flags) == 20,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock_scope) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_subscription_t, proc_terminate.fd) == 16,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, userdata) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, flags) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, type) == 10, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, clock.identifier) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, clock.clock_id) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, clock.timeout) == 32, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, clock.precision) == 40, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, clock.flags) == 48, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, condvar.condvar_scope) == 32, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, condvar.lock_scope) == 33, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.fd) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, fd_readwrite.flags) == 20, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, lock.lock_scope) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_subscription_t, proc_terminate.fd) == 16, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_subscription_t) == 56, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_subscription_t) == 8, "Incorrect layout");
-typedef struct { _Alignas(8) uint64_t parent; } cloudabi64_tcb_t;
+typedef struct {
+ _Alignas(8) uint64_t parent;
+} cloudabi64_tcb_t;
_Static_assert(offsetof(cloudabi64_tcb_t, parent) == 0, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_tcb_t) == 8, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_tcb_t) == 8, "Incorrect layout");
@@ -242,33 +208,24 @@ typedef struct {
_Alignas(2) cloudabi_sockaddr_t ro_peername;
_Alignas(2) cloudabi_msgflags_t ro_flags;
} cloudabi64_recv_out_t;
-_Static_assert(offsetof(cloudabi64_recv_out_t, ro_datalen) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_out_t, ro_fdslen) == 8,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_out_t, ro_sockname) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_out_t, ro_peername) == 36,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_recv_out_t, ro_flags) == 56,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_out_t, ro_datalen) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_out_t, ro_fdslen) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_out_t, ro_sockname) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_out_t, ro_peername) == 36, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_recv_out_t, ro_flags) == 56, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_recv_out_t) == 64, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_recv_out_t) == 8, "Incorrect layout");
typedef struct {
_Alignas(8) uint64_t entry_point;
_Alignas(8) uint64_t stack;
- _Alignas(8) uint64_t stack_size;
+ _Alignas(8) uint64_t stack_len;
_Alignas(8) uint64_t argument;
} cloudabi64_threadattr_t;
-_Static_assert(offsetof(cloudabi64_threadattr_t, entry_point) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_threadattr_t, stack) == 8,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_threadattr_t, stack_size) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi64_threadattr_t, argument) == 24,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_threadattr_t, entry_point) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_threadattr_t, stack) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_threadattr_t, stack_len) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi64_threadattr_t, argument) == 24, "Incorrect layout");
_Static_assert(sizeof(cloudabi64_threadattr_t) == 32, "Incorrect layout");
_Static_assert(_Alignof(cloudabi64_threadattr_t) == 8, "Incorrect layout");
diff --git a/sys/contrib/cloudabi/cloudabi_types_common.h b/sys/contrib/cloudabi/cloudabi_types_common.h
index 0297e2a9..86e76d3 100644
--- a/sys/contrib/cloudabi/cloudabi_types_common.h
+++ b/sys/contrib/cloudabi/cloudabi_types_common.h
@@ -38,34 +38,34 @@
#endif
typedef uint8_t cloudabi_advice_t;
-#define CLOUDABI_ADVICE_DONTNEED 1
-#define CLOUDABI_ADVICE_NOREUSE 2
-#define CLOUDABI_ADVICE_NORMAL 3
-#define CLOUDABI_ADVICE_RANDOM 4
+#define CLOUDABI_ADVICE_DONTNEED 1
+#define CLOUDABI_ADVICE_NOREUSE 2
+#define CLOUDABI_ADVICE_NORMAL 3
+#define CLOUDABI_ADVICE_RANDOM 4
#define CLOUDABI_ADVICE_SEQUENTIAL 5
-#define CLOUDABI_ADVICE_WILLNEED 6
+#define CLOUDABI_ADVICE_WILLNEED 6
typedef uint32_t cloudabi_auxtype_t;
-#define CLOUDABI_AT_ARGDATA 256
-#define CLOUDABI_AT_ARGDATALEN 257
-#define CLOUDABI_AT_BASE 7
-#define CLOUDABI_AT_CANARY 258
-#define CLOUDABI_AT_CANARYLEN 259
-#define CLOUDABI_AT_NCPUS 260
-#define CLOUDABI_AT_NULL 0
-#define CLOUDABI_AT_PAGESZ 6
-#define CLOUDABI_AT_PHDR 3
-#define CLOUDABI_AT_PHNUM 4
+#define CLOUDABI_AT_ARGDATA 256
+#define CLOUDABI_AT_ARGDATALEN 257
+#define CLOUDABI_AT_BASE 7
+#define CLOUDABI_AT_CANARY 258
+#define CLOUDABI_AT_CANARYLEN 259
+#define CLOUDABI_AT_NCPUS 260
+#define CLOUDABI_AT_NULL 0
+#define CLOUDABI_AT_PAGESZ 6
+#define CLOUDABI_AT_PHDR 3
+#define CLOUDABI_AT_PHNUM 4
#define CLOUDABI_AT_SYSINFO_EHDR 262
-#define CLOUDABI_AT_TID 261
+#define CLOUDABI_AT_TID 261
typedef uint32_t cloudabi_backlog_t;
typedef uint32_t cloudabi_clockid_t;
-#define CLOUDABI_CLOCK_MONOTONIC 1
+#define CLOUDABI_CLOCK_MONOTONIC 1
#define CLOUDABI_CLOCK_PROCESS_CPUTIME_ID 2
-#define CLOUDABI_CLOCK_REALTIME 3
-#define CLOUDABI_CLOCK_THREAD_CPUTIME_ID 4
+#define CLOUDABI_CLOCK_REALTIME 3
+#define CLOUDABI_CLOCK_THREAD_CPUTIME_ID 4
typedef uint32_t cloudabi_condvar_t;
#define CLOUDABI_CONDVAR_HAS_NO_WAITERS 0
@@ -76,110 +76,110 @@ typedef uint64_t cloudabi_dircookie_t;
#define CLOUDABI_DIRCOOKIE_START 0
typedef uint16_t cloudabi_errno_t;
-#define CLOUDABI_E2BIG 1
-#define CLOUDABI_EACCES 2
-#define CLOUDABI_EADDRINUSE 3
-#define CLOUDABI_EADDRNOTAVAIL 4
-#define CLOUDABI_EAFNOSUPPORT 5
-#define CLOUDABI_EAGAIN 6
-#define CLOUDABI_EALREADY 7
-#define CLOUDABI_EBADF 8
-#define CLOUDABI_EBADMSG 9
-#define CLOUDABI_EBUSY 10
-#define CLOUDABI_ECANCELED 11
-#define CLOUDABI_ECHILD 12
-#define CLOUDABI_ECONNABORTED 13
-#define CLOUDABI_ECONNREFUSED 14
-#define CLOUDABI_ECONNRESET 15
-#define CLOUDABI_EDEADLK 16
-#define CLOUDABI_EDESTADDRREQ 17
-#define CLOUDABI_EDOM 18
-#define CLOUDABI_EDQUOT 19
-#define CLOUDABI_EEXIST 20
-#define CLOUDABI_EFAULT 21
-#define CLOUDABI_EFBIG 22
-#define CLOUDABI_EHOSTUNREACH 23
-#define CLOUDABI_EIDRM 24
-#define CLOUDABI_EILSEQ 25
-#define CLOUDABI_EINPROGRESS 26
-#define CLOUDABI_EINTR 27
-#define CLOUDABI_EINVAL 28
-#define CLOUDABI_EIO 29
-#define CLOUDABI_EISCONN 30
-#define CLOUDABI_EISDIR 31
-#define CLOUDABI_ELOOP 32
-#define CLOUDABI_EMFILE 33
-#define CLOUDABI_EMLINK 34
-#define CLOUDABI_EMSGSIZE 35
-#define CLOUDABI_EMULTIHOP 36
-#define CLOUDABI_ENAMETOOLONG 37
-#define CLOUDABI_ENETDOWN 38
-#define CLOUDABI_ENETRESET 39
-#define CLOUDABI_ENETUNREACH 40
-#define CLOUDABI_ENFILE 41
-#define CLOUDABI_ENOBUFS 42
-#define CLOUDABI_ENODEV 43
-#define CLOUDABI_ENOENT 44
-#define CLOUDABI_ENOEXEC 45
-#define CLOUDABI_ENOLCK 46
-#define CLOUDABI_ENOLINK 47
-#define CLOUDABI_ENOMEM 48
-#define CLOUDABI_ENOMSG 49
-#define CLOUDABI_ENOPROTOOPT 50
-#define CLOUDABI_ENOSPC 51
-#define CLOUDABI_ENOSYS 52
-#define CLOUDABI_ENOTCONN 53
-#define CLOUDABI_ENOTDIR 54
-#define CLOUDABI_ENOTEMPTY 55
+#define CLOUDABI_E2BIG 1
+#define CLOUDABI_EACCES 2
+#define CLOUDABI_EADDRINUSE 3
+#define CLOUDABI_EADDRNOTAVAIL 4
+#define CLOUDABI_EAFNOSUPPORT 5
+#define CLOUDABI_EAGAIN 6
+#define CLOUDABI_EALREADY 7
+#define CLOUDABI_EBADF 8
+#define CLOUDABI_EBADMSG 9
+#define CLOUDABI_EBUSY 10
+#define CLOUDABI_ECANCELED 11
+#define CLOUDABI_ECHILD 12
+#define CLOUDABI_ECONNABORTED 13
+#define CLOUDABI_ECONNREFUSED 14
+#define CLOUDABI_ECONNRESET 15
+#define CLOUDABI_EDEADLK 16
+#define CLOUDABI_EDESTADDRREQ 17
+#define CLOUDABI_EDOM 18
+#define CLOUDABI_EDQUOT 19
+#define CLOUDABI_EEXIST 20
+#define CLOUDABI_EFAULT 21
+#define CLOUDABI_EFBIG 22
+#define CLOUDABI_EHOSTUNREACH 23
+#define CLOUDABI_EIDRM 24
+#define CLOUDABI_EILSEQ 25
+#define CLOUDABI_EINPROGRESS 26
+#define CLOUDABI_EINTR 27
+#define CLOUDABI_EINVAL 28
+#define CLOUDABI_EIO 29
+#define CLOUDABI_EISCONN 30
+#define CLOUDABI_EISDIR 31
+#define CLOUDABI_ELOOP 32
+#define CLOUDABI_EMFILE 33
+#define CLOUDABI_EMLINK 34
+#define CLOUDABI_EMSGSIZE 35
+#define CLOUDABI_EMULTIHOP 36
+#define CLOUDABI_ENAMETOOLONG 37
+#define CLOUDABI_ENETDOWN 38
+#define CLOUDABI_ENETRESET 39
+#define CLOUDABI_ENETUNREACH 40
+#define CLOUDABI_ENFILE 41
+#define CLOUDABI_ENOBUFS 42
+#define CLOUDABI_ENODEV 43
+#define CLOUDABI_ENOENT 44
+#define CLOUDABI_ENOEXEC 45
+#define CLOUDABI_ENOLCK 46
+#define CLOUDABI_ENOLINK 47
+#define CLOUDABI_ENOMEM 48
+#define CLOUDABI_ENOMSG 49
+#define CLOUDABI_ENOPROTOOPT 50
+#define CLOUDABI_ENOSPC 51
+#define CLOUDABI_ENOSYS 52
+#define CLOUDABI_ENOTCONN 53
+#define CLOUDABI_ENOTDIR 54
+#define CLOUDABI_ENOTEMPTY 55
#define CLOUDABI_ENOTRECOVERABLE 56
-#define CLOUDABI_ENOTSOCK 57
-#define CLOUDABI_ENOTSUP 58
-#define CLOUDABI_ENOTTY 59
-#define CLOUDABI_ENXIO 60
-#define CLOUDABI_EOVERFLOW 61
-#define CLOUDABI_EOWNERDEAD 62
-#define CLOUDABI_EPERM 63
-#define CLOUDABI_EPIPE 64
-#define CLOUDABI_EPROTO 65
+#define CLOUDABI_ENOTSOCK 57
+#define CLOUDABI_ENOTSUP 58
+#define CLOUDABI_ENOTTY 59
+#define CLOUDABI_ENXIO 60
+#define CLOUDABI_EOVERFLOW 61
+#define CLOUDABI_EOWNERDEAD 62
+#define CLOUDABI_EPERM 63
+#define CLOUDABI_EPIPE 64
+#define CLOUDABI_EPROTO 65
#define CLOUDABI_EPROTONOSUPPORT 66
-#define CLOUDABI_EPROTOTYPE 67
-#define CLOUDABI_ERANGE 68
-#define CLOUDABI_EROFS 69
-#define CLOUDABI_ESPIPE 70
-#define CLOUDABI_ESRCH 71
-#define CLOUDABI_ESTALE 72
-#define CLOUDABI_ETIMEDOUT 73
-#define CLOUDABI_ETXTBSY 74
-#define CLOUDABI_EXDEV 75
-#define CLOUDABI_ENOTCAPABLE 76
+#define CLOUDABI_EPROTOTYPE 67
+#define CLOUDABI_ERANGE 68
+#define CLOUDABI_EROFS 69
+#define CLOUDABI_ESPIPE 70
+#define CLOUDABI_ESRCH 71
+#define CLOUDABI_ESTALE 72
+#define CLOUDABI_ETIMEDOUT 73
+#define CLOUDABI_ETXTBSY 74
+#define CLOUDABI_EXDEV 75
+#define CLOUDABI_ENOTCAPABLE 76
typedef uint16_t cloudabi_eventrwflags_t;
#define CLOUDABI_EVENT_FD_READWRITE_HANGUP 0x0001
typedef uint8_t cloudabi_eventtype_t;
-#define CLOUDABI_EVENTTYPE_CLOCK 1
-#define CLOUDABI_EVENTTYPE_CONDVAR 2
-#define CLOUDABI_EVENTTYPE_FD_READ 3
-#define CLOUDABI_EVENTTYPE_FD_WRITE 4
-#define CLOUDABI_EVENTTYPE_LOCK_RDLOCK 5
-#define CLOUDABI_EVENTTYPE_LOCK_WRLOCK 6
+#define CLOUDABI_EVENTTYPE_CLOCK 1
+#define CLOUDABI_EVENTTYPE_CONDVAR 2
+#define CLOUDABI_EVENTTYPE_FD_READ 3
+#define CLOUDABI_EVENTTYPE_FD_WRITE 4
+#define CLOUDABI_EVENTTYPE_LOCK_RDLOCK 5
+#define CLOUDABI_EVENTTYPE_LOCK_WRLOCK 6
#define CLOUDABI_EVENTTYPE_PROC_TERMINATE 7
typedef uint32_t cloudabi_exitcode_t;
typedef uint32_t cloudabi_fd_t;
#define CLOUDABI_PROCESS_CHILD 0xffffffff
-#define CLOUDABI_MAP_ANON_FD 0xffffffff
+#define CLOUDABI_MAP_ANON_FD 0xffffffff
typedef uint16_t cloudabi_fdflags_t;
-#define CLOUDABI_FDFLAG_APPEND 0x0001
-#define CLOUDABI_FDFLAG_DSYNC 0x0002
+#define CLOUDABI_FDFLAG_APPEND 0x0001
+#define CLOUDABI_FDFLAG_DSYNC 0x0002
#define CLOUDABI_FDFLAG_NONBLOCK 0x0004
-#define CLOUDABI_FDFLAG_RSYNC 0x0008
-#define CLOUDABI_FDFLAG_SYNC 0x0010
+#define CLOUDABI_FDFLAG_RSYNC 0x0008
+#define CLOUDABI_FDFLAG_SYNC 0x0010
typedef uint16_t cloudabi_fdsflags_t;
-#define CLOUDABI_FDSTAT_FLAGS 0x0001
+#define CLOUDABI_FDSTAT_FLAGS 0x0001
#define CLOUDABI_FDSTAT_RIGHTS 0x0002
typedef int64_t cloudabi_filedelta_t;
@@ -187,155 +187,155 @@ typedef int64_t cloudabi_filedelta_t;
typedef uint64_t cloudabi_filesize_t;
typedef uint8_t cloudabi_filetype_t;
-#define CLOUDABI_FILETYPE_UNKNOWN 0
-#define CLOUDABI_FILETYPE_BLOCK_DEVICE 16
-#define CLOUDABI_FILETYPE_CHARACTER_DEVICE 17
-#define CLOUDABI_FILETYPE_DIRECTORY 32
-#define CLOUDABI_FILETYPE_FIFO 48
-#define CLOUDABI_FILETYPE_POLL 64
-#define CLOUDABI_FILETYPE_PROCESS 80
-#define CLOUDABI_FILETYPE_REGULAR_FILE 96
-#define CLOUDABI_FILETYPE_SHARED_MEMORY 112
-#define CLOUDABI_FILETYPE_SOCKET_DGRAM 128
+#define CLOUDABI_FILETYPE_UNKNOWN 0
+#define CLOUDABI_FILETYPE_BLOCK_DEVICE 16
+#define CLOUDABI_FILETYPE_CHARACTER_DEVICE 17
+#define CLOUDABI_FILETYPE_DIRECTORY 32
+#define CLOUDABI_FILETYPE_FIFO 48
+#define CLOUDABI_FILETYPE_POLL 64
+#define CLOUDABI_FILETYPE_PROCESS 80
+#define CLOUDABI_FILETYPE_REGULAR_FILE 96
+#define CLOUDABI_FILETYPE_SHARED_MEMORY 112
+#define CLOUDABI_FILETYPE_SOCKET_DGRAM 128
#define CLOUDABI_FILETYPE_SOCKET_SEQPACKET 129
-#define CLOUDABI_FILETYPE_SOCKET_STREAM 130
-#define CLOUDABI_FILETYPE_SYMBOLIC_LINK 144
+#define CLOUDABI_FILETYPE_SOCKET_STREAM 130
+#define CLOUDABI_FILETYPE_SYMBOLIC_LINK 144
typedef uint16_t cloudabi_fsflags_t;
-#define CLOUDABI_FILESTAT_ATIM 0x0001
+#define CLOUDABI_FILESTAT_ATIM 0x0001
#define CLOUDABI_FILESTAT_ATIM_NOW 0x0002
-#define CLOUDABI_FILESTAT_MTIM 0x0004
+#define CLOUDABI_FILESTAT_MTIM 0x0004
#define CLOUDABI_FILESTAT_MTIM_NOW 0x0008
-#define CLOUDABI_FILESTAT_SIZE 0x0010
+#define CLOUDABI_FILESTAT_SIZE 0x0010
typedef uint64_t cloudabi_inode_t;
typedef uint32_t cloudabi_linkcount_t;
typedef uint32_t cloudabi_lock_t;
-#define CLOUDABI_LOCK_UNLOCKED 0x00000000
-#define CLOUDABI_LOCK_WRLOCKED 0x40000000
+#define CLOUDABI_LOCK_UNLOCKED 0x00000000
+#define CLOUDABI_LOCK_WRLOCKED 0x40000000
#define CLOUDABI_LOCK_KERNEL_MANAGED 0x80000000
-#define CLOUDABI_LOCK_BOGUS 0x80000000
+#define CLOUDABI_LOCK_BOGUS 0x80000000
typedef uint32_t cloudabi_lookupflags_t;
#define CLOUDABI_LOOKUP_SYMLINK_FOLLOW 0x00000001
typedef uint8_t cloudabi_mflags_t;
-#define CLOUDABI_MAP_ANON 0x01
-#define CLOUDABI_MAP_FIXED 0x02
+#define CLOUDABI_MAP_ANON 0x01
+#define CLOUDABI_MAP_FIXED 0x02
#define CLOUDABI_MAP_PRIVATE 0x04
-#define CLOUDABI_MAP_SHARED 0x08
+#define CLOUDABI_MAP_SHARED 0x08
typedef uint8_t cloudabi_mprot_t;
-#define CLOUDABI_PROT_EXEC 0x01
+#define CLOUDABI_PROT_EXEC 0x01
#define CLOUDABI_PROT_WRITE 0x02
-#define CLOUDABI_PROT_READ 0x04
+#define CLOUDABI_PROT_READ 0x04
typedef uint8_t cloudabi_msflags_t;
-#define CLOUDABI_MS_ASYNC 0x01
+#define CLOUDABI_MS_ASYNC 0x01
#define CLOUDABI_MS_INVALIDATE 0x02
-#define CLOUDABI_MS_SYNC 0x04
+#define CLOUDABI_MS_SYNC 0x04
typedef uint16_t cloudabi_msgflags_t;
-#define CLOUDABI_MSG_CTRUNC 0x0001
-#define CLOUDABI_MSG_EOR 0x0002
-#define CLOUDABI_MSG_PEEK 0x0004
-#define CLOUDABI_MSG_TRUNC 0x0008
+#define CLOUDABI_MSG_CTRUNC 0x0001
+#define CLOUDABI_MSG_EOR 0x0002
+#define CLOUDABI_MSG_PEEK 0x0004
+#define CLOUDABI_MSG_TRUNC 0x0008
#define CLOUDABI_MSG_WAITALL 0x0010
typedef uint32_t cloudabi_nthreads_t;
typedef uint16_t cloudabi_oflags_t;
-#define CLOUDABI_O_CREAT 0x0001
+#define CLOUDABI_O_CREAT 0x0001
#define CLOUDABI_O_DIRECTORY 0x0002
-#define CLOUDABI_O_EXCL 0x0004
-#define CLOUDABI_O_TRUNC 0x0008
+#define CLOUDABI_O_EXCL 0x0004
+#define CLOUDABI_O_TRUNC 0x0008
typedef uint64_t cloudabi_rights_t;
-#define CLOUDABI_RIGHT_FD_DATASYNC 0x0000000000000001
-#define CLOUDABI_RIGHT_FD_READ 0x0000000000000002
-#define CLOUDABI_RIGHT_FD_SEEK 0x0000000000000004
-#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS 0x0000000000000008
-#define CLOUDABI_RIGHT_FD_SYNC 0x0000000000000010
-#define CLOUDABI_RIGHT_FD_TELL 0x0000000000000020
-#define CLOUDABI_RIGHT_FD_WRITE 0x0000000000000040
-#define CLOUDABI_RIGHT_FILE_ADVISE 0x0000000000000080
-#define CLOUDABI_RIGHT_FILE_ALLOCATE 0x0000000000000100
-#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200
-#define CLOUDABI_RIGHT_FILE_CREATE_FILE 0x0000000000000400
-#define CLOUDABI_RIGHT_FILE_CREATE_FIFO 0x0000000000000800
-#define CLOUDABI_RIGHT_FILE_LINK_SOURCE 0x0000000000001000
-#define CLOUDABI_RIGHT_FILE_LINK_TARGET 0x0000000000002000
-#define CLOUDABI_RIGHT_FILE_OPEN 0x0000000000004000
-#define CLOUDABI_RIGHT_FILE_READDIR 0x0000000000008000
-#define CLOUDABI_RIGHT_FILE_READLINK 0x0000000000010000
-#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE 0x0000000000020000
-#define CLOUDABI_RIGHT_FILE_RENAME_TARGET 0x0000000000040000
-#define CLOUDABI_RIGHT_FILE_STAT_FGET 0x0000000000080000
-#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE 0x0000000000100000
-#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES 0x0000000000200000
-#define CLOUDABI_RIGHT_FILE_STAT_GET 0x0000000000400000
-#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES 0x0000000000800000
-#define CLOUDABI_RIGHT_FILE_SYMLINK 0x0000000001000000
-#define CLOUDABI_RIGHT_FILE_UNLINK 0x0000000002000000
-#define CLOUDABI_RIGHT_MEM_MAP 0x0000000004000000
-#define CLOUDABI_RIGHT_MEM_MAP_EXEC 0x0000000008000000
-#define CLOUDABI_RIGHT_POLL_FD_READWRITE 0x0000000010000000
-#define CLOUDABI_RIGHT_POLL_MODIFY 0x0000000020000000
-#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE 0x0000000040000000
-#define CLOUDABI_RIGHT_POLL_WAIT 0x0000000080000000
-#define CLOUDABI_RIGHT_PROC_EXEC 0x0000000100000000
-#define CLOUDABI_RIGHT_SOCK_ACCEPT 0x0000000200000000
-#define CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY 0x0000000400000000
-#define CLOUDABI_RIGHT_SOCK_BIND_SOCKET 0x0000000800000000
+#define CLOUDABI_RIGHT_FD_DATASYNC 0x0000000000000001
+#define CLOUDABI_RIGHT_FD_READ 0x0000000000000002
+#define CLOUDABI_RIGHT_FD_SEEK 0x0000000000000004
+#define CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS 0x0000000000000008
+#define CLOUDABI_RIGHT_FD_SYNC 0x0000000000000010
+#define CLOUDABI_RIGHT_FD_TELL 0x0000000000000020
+#define CLOUDABI_RIGHT_FD_WRITE 0x0000000000000040
+#define CLOUDABI_RIGHT_FILE_ADVISE 0x0000000000000080
+#define CLOUDABI_RIGHT_FILE_ALLOCATE 0x0000000000000100
+#define CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY 0x0000000000000200
+#define CLOUDABI_RIGHT_FILE_CREATE_FILE 0x0000000000000400
+#define CLOUDABI_RIGHT_FILE_CREATE_FIFO 0x0000000000000800
+#define CLOUDABI_RIGHT_FILE_LINK_SOURCE 0x0000000000001000
+#define CLOUDABI_RIGHT_FILE_LINK_TARGET 0x0000000000002000
+#define CLOUDABI_RIGHT_FILE_OPEN 0x0000000000004000
+#define CLOUDABI_RIGHT_FILE_READDIR 0x0000000000008000
+#define CLOUDABI_RIGHT_FILE_READLINK 0x0000000000010000
+#define CLOUDABI_RIGHT_FILE_RENAME_SOURCE 0x0000000000020000
+#define CLOUDABI_RIGHT_FILE_RENAME_TARGET 0x0000000000040000
+#define CLOUDABI_RIGHT_FILE_STAT_FGET 0x0000000000080000
+#define CLOUDABI_RIGHT_FILE_STAT_FPUT_SIZE 0x0000000000100000
+#define CLOUDABI_RIGHT_FILE_STAT_FPUT_TIMES 0x0000000000200000
+#define CLOUDABI_RIGHT_FILE_STAT_GET 0x0000000000400000
+#define CLOUDABI_RIGHT_FILE_STAT_PUT_TIMES 0x0000000000800000
+#define CLOUDABI_RIGHT_FILE_SYMLINK 0x0000000001000000
+#define CLOUDABI_RIGHT_FILE_UNLINK 0x0000000002000000
+#define CLOUDABI_RIGHT_MEM_MAP 0x0000000004000000
+#define CLOUDABI_RIGHT_MEM_MAP_EXEC 0x0000000008000000
+#define CLOUDABI_RIGHT_POLL_FD_READWRITE 0x0000000010000000
+#define CLOUDABI_RIGHT_POLL_MODIFY 0x0000000020000000
+#define CLOUDABI_RIGHT_POLL_PROC_TERMINATE 0x0000000040000000
+#define CLOUDABI_RIGHT_POLL_WAIT 0x0000000080000000
+#define CLOUDABI_RIGHT_PROC_EXEC 0x0000000100000000
+#define CLOUDABI_RIGHT_SOCK_ACCEPT 0x0000000200000000
+#define CLOUDABI_RIGHT_SOCK_BIND_DIRECTORY 0x0000000400000000
+#define CLOUDABI_RIGHT_SOCK_BIND_SOCKET 0x0000000800000000
#define CLOUDABI_RIGHT_SOCK_CONNECT_DIRECTORY 0x0000001000000000
-#define CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET 0x0000002000000000
-#define CLOUDABI_RIGHT_SOCK_LISTEN 0x0000004000000000
-#define CLOUDABI_RIGHT_SOCK_SHUTDOWN 0x0000008000000000
-#define CLOUDABI_RIGHT_SOCK_STAT_GET 0x0000010000000000
+#define CLOUDABI_RIGHT_SOCK_CONNECT_SOCKET 0x0000002000000000
+#define CLOUDABI_RIGHT_SOCK_LISTEN 0x0000004000000000
+#define CLOUDABI_RIGHT_SOCK_SHUTDOWN 0x0000008000000000
+#define CLOUDABI_RIGHT_SOCK_STAT_GET 0x0000010000000000
typedef uint8_t cloudabi_sa_family_t;
#define CLOUDABI_AF_UNSPEC 0
-#define CLOUDABI_AF_INET 1
-#define CLOUDABI_AF_INET6 2
-#define CLOUDABI_AF_UNIX 3
+#define CLOUDABI_AF_INET 1
+#define CLOUDABI_AF_INET6 2
+#define CLOUDABI_AF_UNIX 3
typedef uint8_t cloudabi_scope_t;
#define CLOUDABI_SCOPE_PRIVATE 4
-#define CLOUDABI_SCOPE_SHARED 8
+#define CLOUDABI_SCOPE_SHARED 8
typedef uint8_t cloudabi_sdflags_t;
#define CLOUDABI_SHUT_RD 0x01
#define CLOUDABI_SHUT_WR 0x02
typedef uint8_t cloudabi_signal_t;
-#define CLOUDABI_SIGABRT 1
-#define CLOUDABI_SIGALRM 2
-#define CLOUDABI_SIGBUS 3
-#define CLOUDABI_SIGCHLD 4
-#define CLOUDABI_SIGCONT 5
-#define CLOUDABI_SIGFPE 6
-#define CLOUDABI_SIGHUP 7
-#define CLOUDABI_SIGILL 8
-#define CLOUDABI_SIGINT 9
-#define CLOUDABI_SIGKILL 10
-#define CLOUDABI_SIGPIPE 11
-#define CLOUDABI_SIGQUIT 12
-#define CLOUDABI_SIGSEGV 13
-#define CLOUDABI_SIGSTOP 14
-#define CLOUDABI_SIGSYS 15
-#define CLOUDABI_SIGTERM 16
-#define CLOUDABI_SIGTRAP 17
-#define CLOUDABI_SIGTSTP 18
-#define CLOUDABI_SIGTTIN 19
-#define CLOUDABI_SIGTTOU 20
-#define CLOUDABI_SIGURG 21
-#define CLOUDABI_SIGUSR1 22
-#define CLOUDABI_SIGUSR2 23
+#define CLOUDABI_SIGABRT 1
+#define CLOUDABI_SIGALRM 2
+#define CLOUDABI_SIGBUS 3
+#define CLOUDABI_SIGCHLD 4
+#define CLOUDABI_SIGCONT 5
+#define CLOUDABI_SIGFPE 6
+#define CLOUDABI_SIGHUP 7
+#define CLOUDABI_SIGILL 8
+#define CLOUDABI_SIGINT 9
+#define CLOUDABI_SIGKILL 10
+#define CLOUDABI_SIGPIPE 11
+#define CLOUDABI_SIGQUIT 12
+#define CLOUDABI_SIGSEGV 13
+#define CLOUDABI_SIGSTOP 14
+#define CLOUDABI_SIGSYS 15
+#define CLOUDABI_SIGTERM 16
+#define CLOUDABI_SIGTRAP 17
+#define CLOUDABI_SIGTSTP 18
+#define CLOUDABI_SIGTTIN 19
+#define CLOUDABI_SIGTTOU 20
+#define CLOUDABI_SIGURG 21
+#define CLOUDABI_SIGUSR1 22
+#define CLOUDABI_SIGUSR2 23
#define CLOUDABI_SIGVTALRM 24
-#define CLOUDABI_SIGXCPU 25
-#define CLOUDABI_SIGXFSZ 26
+#define CLOUDABI_SIGXCPU 25
+#define CLOUDABI_SIGXFSZ 26
typedef uint8_t cloudabi_ssflags_t;
#define CLOUDABI_SOCKSTAT_CLEAR_ERROR 0x01
@@ -347,11 +347,11 @@ typedef uint16_t cloudabi_subclockflags_t;
#define CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME 0x0001
typedef uint16_t cloudabi_subflags_t;
-#define CLOUDABI_SUBSCRIPTION_ADD 0x0001
-#define CLOUDABI_SUBSCRIPTION_CLEAR 0x0002
-#define CLOUDABI_SUBSCRIPTION_DELETE 0x0004
+#define CLOUDABI_SUBSCRIPTION_ADD 0x0001
+#define CLOUDABI_SUBSCRIPTION_CLEAR 0x0002
+#define CLOUDABI_SUBSCRIPTION_DELETE 0x0004
#define CLOUDABI_SUBSCRIPTION_DISABLE 0x0008
-#define CLOUDABI_SUBSCRIPTION_ENABLE 0x0010
+#define CLOUDABI_SUBSCRIPTION_ENABLE 0x0010
#define CLOUDABI_SUBSCRIPTION_ONESHOT 0x0020
typedef uint16_t cloudabi_subrwflags_t;
@@ -390,13 +390,10 @@ typedef struct {
_Alignas(8) cloudabi_rights_t fs_rights_base;
_Alignas(8) cloudabi_rights_t fs_rights_inheriting;
} cloudabi_fdstat_t;
-_Static_assert(offsetof(cloudabi_fdstat_t, fs_filetype) == 0,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi_fdstat_t, fs_filetype) == 0, "Incorrect layout");
_Static_assert(offsetof(cloudabi_fdstat_t, fs_flags) == 2, "Incorrect layout");
-_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_base) == 8,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_inheriting) == 16,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_base) == 8, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_fdstat_t, fs_rights_inheriting) == 16, "Incorrect layout");
_Static_assert(sizeof(cloudabi_fdstat_t) == 24, "Incorrect layout");
_Static_assert(_Alignof(cloudabi_fdstat_t) == 8, "Incorrect layout");
@@ -412,18 +409,12 @@ typedef struct {
} cloudabi_filestat_t;
_Static_assert(offsetof(cloudabi_filestat_t, st_dev) == 0, "Incorrect layout");
_Static_assert(offsetof(cloudabi_filestat_t, st_ino) == 8, "Incorrect layout");
-_Static_assert(offsetof(cloudabi_filestat_t, st_filetype) == 16,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_filestat_t, st_nlink) == 20,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_filestat_t, st_size) == 24,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_filestat_t, st_atim) == 32,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_filestat_t, st_mtim) == 40,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_filestat_t, st_ctim) == 48,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi_filestat_t, st_filetype) == 16, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_filestat_t, st_nlink) == 20, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_filestat_t, st_size) == 24, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_filestat_t, st_atim) == 32, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_filestat_t, st_mtim) == 40, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_filestat_t, st_ctim) == 48, "Incorrect layout");
_Static_assert(sizeof(cloudabi_filestat_t) == 56, "Incorrect layout");
_Static_assert(_Alignof(cloudabi_filestat_t) == 8, "Incorrect layout");
@@ -449,16 +440,11 @@ typedef struct {
} sa_inet6;
};
} cloudabi_sockaddr_t;
-_Static_assert(offsetof(cloudabi_sockaddr_t, sa_family) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.addr) == 2,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.port) == 6,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.addr) == 2,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.port) == 18,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockaddr_t, sa_family) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.addr) == 2, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet.port) == 6, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.addr) == 2, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockaddr_t, sa_inet6.port) == 18, "Incorrect layout");
_Static_assert(sizeof(cloudabi_sockaddr_t) == 20, "Incorrect layout");
_Static_assert(_Alignof(cloudabi_sockaddr_t) == 2, "Incorrect layout");
@@ -468,14 +454,10 @@ typedef struct {
_Alignas(2) cloudabi_errno_t ss_error;
_Alignas(4) cloudabi_sstate_t ss_state;
} cloudabi_sockstat_t;
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_sockname) == 0,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_peername) == 20,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_error) == 40,
- "Incorrect layout");
-_Static_assert(offsetof(cloudabi_sockstat_t, ss_state) == 44,
- "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockstat_t, ss_sockname) == 0, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockstat_t, ss_peername) == 20, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockstat_t, ss_error) == 40, "Incorrect layout");
+_Static_assert(offsetof(cloudabi_sockstat_t, ss_state) == 44, "Incorrect layout");
_Static_assert(sizeof(cloudabi_sockstat_t) == 48, "Incorrect layout");
_Static_assert(_Alignof(cloudabi_sockstat_t) == 4, "Incorrect layout");
diff --git a/sys/contrib/cloudabi/syscalls32.master b/sys/contrib/cloudabi/syscalls32.master
index aa3314b..4e0c2b2 100644
--- a/sys/contrib/cloudabi/syscalls32.master
+++ b/sys/contrib/cloudabi/syscalls32.master
@@ -65,20 +65,20 @@
8 AUE_NULL STD { size_t cloudabi32_sys_fd_pread( \
cloudabi_fd_t fd, \
- const cloudabi32_iovec_t *iov, \
- size_t iovcnt, \
+ const cloudabi32_iovec_t *iovs, \
+ size_t iovs_len, \
cloudabi_filesize_t offset); }
9 AUE_NULL STD { size_t cloudabi32_sys_fd_pwrite( \
cloudabi_fd_t fd, \
- const cloudabi32_ciovec_t *iov, \
- size_t iovcnt, \
+ const cloudabi32_ciovec_t *iovs, \
+ size_t iovs_len, \
cloudabi_filesize_t offset); }
10 AUE_NULL STD { size_t cloudabi32_sys_fd_read( \
cloudabi_fd_t fd, \
- const cloudabi32_iovec_t *iov, \
- size_t iovcnt); }
+ const cloudabi32_iovec_t *iovs, \
+ size_t iovs_len); }
11 AUE_NULL STD { void cloudabi_sys_fd_replace( \
cloudabi_fd_t from, \
@@ -104,8 +104,8 @@
16 AUE_NULL STD { size_t cloudabi32_sys_fd_write( \
cloudabi_fd_t fd, \
- const cloudabi32_ciovec_t *iov, \
- size_t iovcnt); }
+ const cloudabi32_ciovec_t *iovs, \
+ size_t iovs_len); }
17 AUE_NULL STD { void cloudabi_sys_file_advise( \
cloudabi_fd_t fd, \
@@ -121,44 +121,44 @@
19 AUE_NULL STD { void cloudabi_sys_file_create( \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_filetype_t type); }
20 AUE_NULL STD { void cloudabi_sys_file_link( \
cloudabi_lookup_t fd1, \
const char *path1, \
- size_t path1len, \
+ size_t path1_len, \
cloudabi_fd_t fd2, \
const char *path2, \
- size_t path2len); }
+ size_t path2_len); }
21 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_file_open( \
cloudabi_lookup_t dirfd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_oflags_t oflags, \
const cloudabi_fdstat_t *fds); }
22 AUE_NULL STD { size_t cloudabi_sys_file_readdir( \
cloudabi_fd_t fd, \
void *buf, \
- size_t nbyte, \
+ size_t buf_len, \
cloudabi_dircookie_t cookie); }
23 AUE_NULL STD { size_t cloudabi_sys_file_readlink( \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
char *buf, \
- size_t bufsize); }
+ size_t buf_len); }
24 AUE_NULL STD { void cloudabi_sys_file_rename( \
- cloudabi_fd_t oldfd, \
- const char *old, \
- size_t oldlen, \
- cloudabi_fd_t newfd, \
- const char *new, \
- size_t newlen); }
+ cloudabi_fd_t fd1, \
+ const char *path1, \
+ size_t path1_len, \
+ cloudabi_fd_t fd2, \
+ const char *path2, \
+ size_t path2_len); }
25 AUE_NULL STD { void cloudabi_sys_file_stat_fget( \
cloudabi_fd_t fd, \
@@ -172,27 +172,27 @@
27 AUE_NULL STD { void cloudabi_sys_file_stat_get( \
cloudabi_lookup_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_filestat_t *buf); }
28 AUE_NULL STD { void cloudabi_sys_file_stat_put( \
cloudabi_lookup_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
const cloudabi_filestat_t *buf, \
cloudabi_fsflags_t flags); }
29 AUE_NULL STD { void cloudabi_sys_file_symlink( \
const char *path1, \
- size_t path1len, \
+ size_t path1_len, \
cloudabi_fd_t fd, \
const char *path2, \
- size_t path2len); }
+ size_t path2_len); }
30 AUE_NULL STD { void cloudabi_sys_file_unlink( \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_ulflags_t flags); }
31 AUE_NULL STD { void cloudabi_sys_lock_unlock( \
@@ -200,13 +200,13 @@
cloudabi_scope_t scope); }
32 AUE_NULL STD { void cloudabi_sys_mem_advise( \
- void *addr, \
- size_t len, \
+ void *mapping, \
+ size_t mapping_len, \
cloudabi_advice_t advice); }
33 AUE_NULL STD { void cloudabi_sys_mem_lock( \
- const void *addr, \
- size_t len); }
+ const void *mapping, \
+ size_t mapping_len); }
34 AUE_NULL STD { void cloudabi_sys_mem_map( \
void *addr, \
@@ -217,22 +217,22 @@
cloudabi_filesize_t off); }
35 AUE_NULL STD { void cloudabi_sys_mem_protect( \
- void *addr, \
- size_t len, \
+ void *mapping, \
+ size_t mapping_len, \
cloudabi_mprot_t prot); }
36 AUE_NULL STD { void cloudabi_sys_mem_sync( \
- void *addr, \
- size_t len, \
+ void *mapping, \
+ size_t mapping_len, \
cloudabi_msflags_t flags); }
37 AUE_NULL STD { void cloudabi_sys_mem_unlock( \
- const void *addr, \
- size_t len); }
+ const void *mapping, \
+ size_t mapping_len); }
38 AUE_NULL STD { void cloudabi_sys_mem_unmap( \
- void *addr, \
- size_t len); }
+ void *mapping, \
+ size_t mapping_len); }
39 AUE_NULL STD { size_t cloudabi32_sys_poll( \
const cloudabi32_subscription_t *in, \
@@ -242,17 +242,17 @@
40 AUE_NULL STD { size_t cloudabi32_sys_poll_fd( \
cloudabi_fd_t fd, \
const cloudabi32_subscription_t *in, \
- size_t nin, \
+ size_t in_len, \
cloudabi32_event_t *out, \
- size_t nout, \
+ size_t out_len, \
const cloudabi32_subscription_t *timeout); }
41 AUE_NULL STD { void cloudabi_sys_proc_exec( \
cloudabi_fd_t fd, \
const void *data, \
- size_t datalen, \
+ size_t data_len, \
const cloudabi_fd_t *fds, \
- size_t fdslen); }
+ size_t fds_len); }
42 AUE_NULL STD { void cloudabi_sys_proc_exit( \
cloudabi_exitcode_t rval); }
@@ -264,7 +264,7 @@
45 AUE_NULL STD { void cloudabi_sys_random_get( \
void *buf, \
- size_t nbyte); }
+ size_t buf_len); }
46 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_sock_accept( \
cloudabi_fd_t sock, \
@@ -274,13 +274,13 @@
cloudabi_fd_t sock, \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen); }
+ size_t path_len); }
48 AUE_NULL STD { void cloudabi_sys_sock_connect( \
cloudabi_fd_t sock, \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen); }
+ size_t path_len); }
49 AUE_NULL STD { void cloudabi_sys_sock_listen( \
cloudabi_fd_t sock, \
diff --git a/sys/contrib/cloudabi/syscalls64.master b/sys/contrib/cloudabi/syscalls64.master
index b2378bd..7f57d76 100644
--- a/sys/contrib/cloudabi/syscalls64.master
+++ b/sys/contrib/cloudabi/syscalls64.master
@@ -65,20 +65,20 @@
8 AUE_NULL STD { size_t cloudabi64_sys_fd_pread( \
cloudabi_fd_t fd, \
- const cloudabi64_iovec_t *iov, \
- size_t iovcnt, \
+ const cloudabi64_iovec_t *iovs, \
+ size_t iovs_len, \
cloudabi_filesize_t offset); }
9 AUE_NULL STD { size_t cloudabi64_sys_fd_pwrite( \
cloudabi_fd_t fd, \
- const cloudabi64_ciovec_t *iov, \
- size_t iovcnt, \
+ const cloudabi64_ciovec_t *iovs, \
+ size_t iovs_len, \
cloudabi_filesize_t offset); }
10 AUE_NULL STD { size_t cloudabi64_sys_fd_read( \
cloudabi_fd_t fd, \
- const cloudabi64_iovec_t *iov, \
- size_t iovcnt); }
+ const cloudabi64_iovec_t *iovs, \
+ size_t iovs_len); }
11 AUE_NULL STD { void cloudabi_sys_fd_replace( \
cloudabi_fd_t from, \
@@ -104,8 +104,8 @@
16 AUE_NULL STD { size_t cloudabi64_sys_fd_write( \
cloudabi_fd_t fd, \
- const cloudabi64_ciovec_t *iov, \
- size_t iovcnt); }
+ const cloudabi64_ciovec_t *iovs, \
+ size_t iovs_len); }
17 AUE_NULL STD { void cloudabi_sys_file_advise( \
cloudabi_fd_t fd, \
@@ -121,44 +121,44 @@
19 AUE_NULL STD { void cloudabi_sys_file_create( \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_filetype_t type); }
20 AUE_NULL STD { void cloudabi_sys_file_link( \
cloudabi_lookup_t fd1, \
const char *path1, \
- size_t path1len, \
+ size_t path1_len, \
cloudabi_fd_t fd2, \
const char *path2, \
- size_t path2len); }
+ size_t path2_len); }
21 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_file_open( \
cloudabi_lookup_t dirfd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_oflags_t oflags, \
const cloudabi_fdstat_t *fds); }
22 AUE_NULL STD { size_t cloudabi_sys_file_readdir( \
cloudabi_fd_t fd, \
void *buf, \
- size_t nbyte, \
+ size_t buf_len, \
cloudabi_dircookie_t cookie); }
23 AUE_NULL STD { size_t cloudabi_sys_file_readlink( \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
char *buf, \
- size_t bufsize); }
+ size_t buf_len); }
24 AUE_NULL STD { void cloudabi_sys_file_rename( \
- cloudabi_fd_t oldfd, \
- const char *old, \
- size_t oldlen, \
- cloudabi_fd_t newfd, \
- const char *new, \
- size_t newlen); }
+ cloudabi_fd_t fd1, \
+ const char *path1, \
+ size_t path1_len, \
+ cloudabi_fd_t fd2, \
+ const char *path2, \
+ size_t path2_len); }
25 AUE_NULL STD { void cloudabi_sys_file_stat_fget( \
cloudabi_fd_t fd, \
@@ -172,27 +172,27 @@
27 AUE_NULL STD { void cloudabi_sys_file_stat_get( \
cloudabi_lookup_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_filestat_t *buf); }
28 AUE_NULL STD { void cloudabi_sys_file_stat_put( \
cloudabi_lookup_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
const cloudabi_filestat_t *buf, \
cloudabi_fsflags_t flags); }
29 AUE_NULL STD { void cloudabi_sys_file_symlink( \
const char *path1, \
- size_t path1len, \
+ size_t path1_len, \
cloudabi_fd_t fd, \
const char *path2, \
- size_t path2len); }
+ size_t path2_len); }
30 AUE_NULL STD { void cloudabi_sys_file_unlink( \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen, \
+ size_t path_len, \
cloudabi_ulflags_t flags); }
31 AUE_NULL STD { void cloudabi_sys_lock_unlock( \
@@ -200,13 +200,13 @@
cloudabi_scope_t scope); }
32 AUE_NULL STD { void cloudabi_sys_mem_advise( \
- void *addr, \
- size_t len, \
+ void *mapping, \
+ size_t mapping_len, \
cloudabi_advice_t advice); }
33 AUE_NULL STD { void cloudabi_sys_mem_lock( \
- const void *addr, \
- size_t len); }
+ const void *mapping, \
+ size_t mapping_len); }
34 AUE_NULL STD { void cloudabi_sys_mem_map( \
void *addr, \
@@ -217,22 +217,22 @@
cloudabi_filesize_t off); }
35 AUE_NULL STD { void cloudabi_sys_mem_protect( \
- void *addr, \
- size_t len, \
+ void *mapping, \
+ size_t mapping_len, \
cloudabi_mprot_t prot); }
36 AUE_NULL STD { void cloudabi_sys_mem_sync( \
- void *addr, \
- size_t len, \
+ void *mapping, \
+ size_t mapping_len, \
cloudabi_msflags_t flags); }
37 AUE_NULL STD { void cloudabi_sys_mem_unlock( \
- const void *addr, \
- size_t len); }
+ const void *mapping, \
+ size_t mapping_len); }
38 AUE_NULL STD { void cloudabi_sys_mem_unmap( \
- void *addr, \
- size_t len); }
+ void *mapping, \
+ size_t mapping_len); }
39 AUE_NULL STD { size_t cloudabi64_sys_poll( \
const cloudabi64_subscription_t *in, \
@@ -242,17 +242,17 @@
40 AUE_NULL STD { size_t cloudabi64_sys_poll_fd( \
cloudabi_fd_t fd, \
const cloudabi64_subscription_t *in, \
- size_t nin, \
+ size_t in_len, \
cloudabi64_event_t *out, \
- size_t nout, \
+ size_t out_len, \
const cloudabi64_subscription_t *timeout); }
41 AUE_NULL STD { void cloudabi_sys_proc_exec( \
cloudabi_fd_t fd, \
const void *data, \
- size_t datalen, \
+ size_t data_len, \
const cloudabi_fd_t *fds, \
- size_t fdslen); }
+ size_t fds_len); }
42 AUE_NULL STD { void cloudabi_sys_proc_exit( \
cloudabi_exitcode_t rval); }
@@ -264,7 +264,7 @@
45 AUE_NULL STD { void cloudabi_sys_random_get( \
void *buf, \
- size_t nbyte); }
+ size_t buf_len); }
46 AUE_NULL STD { cloudabi_fd_t cloudabi_sys_sock_accept( \
cloudabi_fd_t sock, \
@@ -274,13 +274,13 @@
cloudabi_fd_t sock, \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen); }
+ size_t path_len); }
48 AUE_NULL STD { void cloudabi_sys_sock_connect( \
cloudabi_fd_t sock, \
cloudabi_fd_t fd, \
const char *path, \
- size_t pathlen); }
+ size_t path_len); }
49 AUE_NULL STD { void cloudabi_sys_sock_listen( \
cloudabi_fd_t sock, \
OpenPOWER on IntegriCloud