diff options
author | ed <ed@FreeBSD.org> | 2016-03-31 18:50:06 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2016-03-31 18:50:06 +0000 |
commit | 34d932442d51324e6fcc857f3b011ae003224974 (patch) | |
tree | 938629e0d00886bf52863a41daebabf369d9bb59 /sys/contrib | |
parent | 20ec114656780fa413a08040b90055b6d938ff32 (diff) | |
download | FreeBSD-src-34d932442d51324e6fcc857f3b011ae003224974.zip FreeBSD-src-34d932442d51324e6fcc857f3b011ae003224974.tar.gz |
Sync in the latest CloudABI system call definitions.
Some time ago I made a change to merge together the memory scope
definitions used by mmap (MAP_{PRIVATE,SHARED}) and lock objects
(PTHREAD_PROCESS_{PRIVATE,SHARED}). Though that sounded pretty smart
back then, it's backfiring. In the case of mmap it's used with other
flags in a bitmask, but for locking it's an enumeration. As our plan is
to automatically generate bindings for other languages, that looks a bit
sloppy.
Change all of the locking functions to use separate flags instead.
Obtained from: https://github.com/NuxiNL/cloudabi
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/cloudabi/cloudabi64_types.h | 13 | ||||
-rw-r--r-- | sys/contrib/cloudabi/cloudabi_types_common.h | 10 | ||||
-rw-r--r-- | sys/contrib/cloudabi/syscalls.master | 11 |
3 files changed, 22 insertions, 12 deletions
diff --git a/sys/contrib/cloudabi/cloudabi64_types.h b/sys/contrib/cloudabi/cloudabi64_types.h index 22c0d3f..88babaa 100644 --- a/sys/contrib/cloudabi/cloudabi64_types.h +++ b/sys/contrib/cloudabi/cloudabi64_types.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Nuxi, https://nuxi.nl/ +// Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -20,8 +20,9 @@ // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. - +// // This file is automatically generated. Do not edit. +// // Source: https://github.com/NuxiNL/cloudabi #ifndef CLOUDABI64_TYPES_H @@ -101,6 +102,8 @@ _Static_assert(offsetof(cloudabi64_iovec_t, iov_len) == 8, "Incorrect layout"); _Static_assert(sizeof(cloudabi64_iovec_t) == 16, "Incorrect layout"); _Static_assert(_Alignof(cloudabi64_iovec_t) == 8, "Incorrect layout"); +typedef void cloudabi64_processentry_t(uint64_t auxv); + typedef struct { _Alignas(8) uint64_t ri_data; _Alignas(8) uint64_t ri_datalen; @@ -153,8 +156,8 @@ typedef struct { struct { _Alignas(8) uint64_t condvar; _Alignas(8) uint64_t lock; - _Alignas(1) cloudabi_mflags_t condvar_scope; - _Alignas(1) cloudabi_mflags_t lock_scope; + _Alignas(1) cloudabi_scope_t condvar_scope; + _Alignas(1) cloudabi_scope_t lock_scope; } condvar; struct { _Alignas(4) cloudabi_fd_t fd; @@ -162,7 +165,7 @@ typedef struct { } fd_readwrite; struct { _Alignas(8) uint64_t lock; - _Alignas(1) cloudabi_mflags_t lock_scope; + _Alignas(1) cloudabi_scope_t lock_scope; } lock; struct { _Alignas(4) cloudabi_fd_t fd; diff --git a/sys/contrib/cloudabi/cloudabi_types_common.h b/sys/contrib/cloudabi/cloudabi_types_common.h index b680057..83c61b9 100644 --- a/sys/contrib/cloudabi/cloudabi_types_common.h +++ b/sys/contrib/cloudabi/cloudabi_types_common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Nuxi, https://nuxi.nl/ +// Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -20,8 +20,9 @@ // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. - +// // This file is automatically generated. Do not edit. +// // Source: https://github.com/NuxiNL/cloudabi #ifndef CLOUDABI_TYPES_COMMON_H @@ -47,6 +48,7 @@ typedef uint8_t cloudabi_advice_t; 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 @@ -298,6 +300,10 @@ typedef uint8_t cloudabi_sa_family_t; #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 + typedef uint8_t cloudabi_sdflags_t; #define CLOUDABI_SHUT_RD 0x01 #define CLOUDABI_SHUT_WR 0x02 diff --git a/sys/contrib/cloudabi/syscalls.master b/sys/contrib/cloudabi/syscalls.master index 0257fa6..7da55c5 100644 --- a/sys/contrib/cloudabi/syscalls.master +++ b/sys/contrib/cloudabi/syscalls.master @@ -1,6 +1,6 @@ $FreeBSD$ -; Copyright (c) 2016 Nuxi, https://nuxi.nl/ +; Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions @@ -22,8 +22,9 @@ ; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ; SUCH DAMAGE. - +; ; This file is automatically generated. Do not edit. +; ; Source: https://github.com/NuxiNL/cloudabi #include <sys/sysent.h> @@ -44,7 +45,7 @@ 2 AUE_NULL STD { void cloudabi_sys_condvar_signal( \ cloudabi_condvar_t *condvar, \ - cloudabi_mflags_t scope, \ + cloudabi_scope_t scope, \ cloudabi_nthreads_t nwaiters); } 3 AUE_NULL STD { void cloudabi_sys_fd_close( \ @@ -196,7 +197,7 @@ 31 AUE_NULL STD { void cloudabi_sys_lock_unlock( \ cloudabi_lock_t *lock, \ - cloudabi_mflags_t scope); } + cloudabi_scope_t scope); } 32 AUE_NULL STD { void cloudabi_sys_mem_advise( \ void *addr, \ @@ -301,7 +302,7 @@ 54 AUE_NULL STD { void cloudabi_sys_thread_exit( \ cloudabi_lock_t *lock, \ - cloudabi_mflags_t scope); } + cloudabi_scope_t scope); } 55 AUE_NULL STD { void cloudabi_sys_thread_tcb_set( \ void *tcb); } |