svn commit: r285307 - in head/sys: compat/cloudabi compat/cloudabi64 conf contrib/cloudabi kern

Adrian Chadd adrian.chadd at gmail.com
Thu Jul 9 17:11:26 UTC 2015


Hi,

So this isn't at all included in a system by default? Or is it disable-able?

All I see in options is COMPAT_CLOUDABI64.



-adrian


On 9 July 2015 at 00:20, Ed Schouten <ed at freebsd.org> wrote:
> Author: ed
> Date: Thu Jul  9 07:20:15 2015
> New Revision: 285307
> URL: https://svnweb.freebsd.org/changeset/base/285307
>
> Log:
>   Import the CloudABI datatypes and create a system call table.
>
>   CloudABI is a pure capability-based runtime environment for UNIX. It
>   works similar to Capsicum, except that processes already run in
>   capabilities mode on startup. All functionality that conflicts with this
>   model has been omitted, making it a compact binary interface that can be
>   supported by other operating systems without too much effort.
>
>   CloudABI is 'secure by default'; the idea is that it should be safe to
>   run arbitrary third-party binaries without requiring any explicit
>   hardware virtualization (Bhyve) or namespace virtualization (Jails). The
>   rights of an application are purely determined by the set of file
>   descriptors that you grant it on startup.
>
>   The datatypes and constants used by CloudABI's C library (cloudlibc) are
>   defined in separate files called syscalldefs_mi.h (pointer size
>   independent) and syscalldefs_md.h (pointer size dependent). We import
>   these files in sys/contrib/cloudabi and wrap around them in
>   cloudabi*_syscalldefs.h.
>
>   We then add stubs for all of the system calls in sys/compat/cloudabi or
>   sys/compat/cloudabi64, depending on whether the system call depends on
>   the pointer size. We only have nine system calls that depend on the
>   pointer size. If we ever want to support 32-bit binaries, we can simply
>   add sys/compat/cloudabi32 and implement these nine system calls again.
>
>   The next step is to send in code reviews for the individual system call
>   implementations, but also add a sysentvec, to allow CloudABI executabled
>   to be started through execve().
>
>   More information about CloudABI:
>   - GitHub: https://github.com/NuxiNL/cloudlibc
>   - Talk at BSDCan: https://www.youtube.com/watch?v=SVdF84x1EdA
>
>   Differential Revision:        https://reviews.freebsd.org/D2848
>   Reviewed by:  emaste, brooks
>   Obtained from:        https://github.com/NuxiNL/freebsd
>
> Added:
>   head/sys/compat/cloudabi/
>   head/sys/compat/cloudabi/cloudabi_clock.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_fd.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_file.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_futex.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_mem.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_proc.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_proto.h   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_random.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_sock.c   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_syscalldefs.h   (contents, props changed)
>   head/sys/compat/cloudabi/cloudabi_thread.c   (contents, props changed)
>   head/sys/compat/cloudabi64/
>   head/sys/compat/cloudabi64/Makefile   (contents, props changed)
>   head/sys/compat/cloudabi64/cloudabi64_fd.c   (contents, props changed)
>   head/sys/compat/cloudabi64/cloudabi64_poll.c   (contents, props changed)
>   head/sys/compat/cloudabi64/cloudabi64_sock.c   (contents, props changed)
>   head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h   (contents, props changed)
>   head/sys/compat/cloudabi64/cloudabi64_thread.c   (contents, props changed)
>   head/sys/compat/cloudabi64/syscalls.conf   (contents, props changed)
>   head/sys/compat/cloudabi64/syscalls.master   (contents, props changed)
>   head/sys/contrib/cloudabi/
>   head/sys/contrib/cloudabi/syscalldefs_md.h   (contents, props changed)
>   head/sys/contrib/cloudabi/syscalldefs_mi.h   (contents, props changed)
> Modified:
>   head/sys/conf/files
>   head/sys/conf/options
>   head/sys/kern/makesyscalls.sh
>
> Added: head/sys/compat/cloudabi/cloudabi_clock.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_clock.c   Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,47 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_clock_res_get(struct thread *td,
> +    struct cloudabi_sys_clock_res_get_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_clock_time_get(struct thread *td,
> +    struct cloudabi_sys_clock_time_get_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_fd.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_fd.c      Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,115 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_fd_close(struct thread *td, struct cloudabi_sys_fd_close_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_create1(struct thread *td,
> +    struct cloudabi_sys_fd_create1_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_create2(struct thread *td,
> +    struct cloudabi_sys_fd_create2_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_datasync(struct thread *td,
> +    struct cloudabi_sys_fd_datasync_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_dup(struct thread *td, struct cloudabi_sys_fd_dup_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_replace(struct thread *td,
> +    struct cloudabi_sys_fd_replace_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_seek(struct thread *td, struct cloudabi_sys_fd_seek_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_stat_get(struct thread *td,
> +    struct cloudabi_sys_fd_stat_get_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_stat_put(struct thread *td,
> +    struct cloudabi_sys_fd_stat_put_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_fd_sync(struct thread *td, struct cloudabi_sys_fd_sync_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_file.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_file.c    Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,155 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_file_advise(struct thread *td,
> +    struct cloudabi_sys_file_advise_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_allocate(struct thread *td,
> +    struct cloudabi_sys_file_allocate_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_create(struct thread *td,
> +    struct cloudabi_sys_file_create_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_link(struct thread *td,
> +    struct cloudabi_sys_file_link_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_open(struct thread *td,
> +    struct cloudabi_sys_file_open_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_readdir(struct thread *td,
> +    struct cloudabi_sys_file_readdir_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_readlink(struct thread *td,
> +    struct cloudabi_sys_file_readlink_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_rename(struct thread *td,
> +    struct cloudabi_sys_file_rename_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_stat_fget(struct thread *td,
> +    struct cloudabi_sys_file_stat_fget_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_stat_fput(struct thread *td,
> +    struct cloudabi_sys_file_stat_fput_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_stat_get(struct thread *td,
> +    struct cloudabi_sys_file_stat_get_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_stat_put(struct thread *td,
> +    struct cloudabi_sys_file_stat_put_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_symlink(struct thread *td,
> +    struct cloudabi_sys_file_symlink_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_file_unlink(struct thread *td,
> +    struct cloudabi_sys_file_unlink_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_futex.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_futex.c   Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,47 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_condvar_signal(struct thread *td,
> +    struct cloudabi_sys_condvar_signal_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_lock_unlock(struct thread *td,
> +    struct cloudabi_sys_lock_unlock_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_mem.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_mem.c     Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,89 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_mem_advise(struct thread *td,
> +    struct cloudabi_sys_mem_advise_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_mem_map(struct thread *td, struct cloudabi_sys_mem_map_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_mem_protect(struct thread *td,
> +    struct cloudabi_sys_mem_protect_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_mem_sync(struct thread *td, struct cloudabi_sys_mem_sync_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_mem_unlock(struct thread *td,
> +    struct cloudabi_sys_mem_unlock_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_mem_unmap(struct thread *td,
> +    struct cloudabi_sys_mem_unmap_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_proc.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_proc.c    Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,65 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_proc_exec(struct thread *td,
> +    struct cloudabi_sys_proc_exec_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_proc_exit(struct thread *td,
> +    struct cloudabi_sys_proc_exit_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_proc_fork(struct thread *td,
> +    struct cloudabi_sys_proc_fork_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_proc_raise(struct thread *td,
> +    struct cloudabi_sys_proc_raise_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_proto.h
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_proto.h   Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,34 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + *
> + * $FreeBSD$
> + */
> +
> +/*
> + * This should provide all prototypes for the machine-independent system
> + * calls. Unfortunately, we don't have a separate system call table for
> + * those, so rely on the system call table from COMPAT_CLOUDABI64.
> + */
> +#include <compat/cloudabi64/cloudabi64_syscalldefs.h>
> +#include <compat/cloudabi64/cloudabi64_proto.h>
>
> Added: head/sys/compat/cloudabi/cloudabi_random.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_random.c  Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,38 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_random_get(struct thread *td,
> +    struct cloudabi_sys_random_get_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_sock.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_sock.c    Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,83 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_sock_accept(struct thread *td,
> +    struct cloudabi_sys_sock_accept_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_sock_bind(struct thread *td,
> +    struct cloudabi_sys_sock_bind_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_sock_connect(struct thread *td,
> +    struct cloudabi_sys_sock_connect_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_sock_listen(struct thread *td,
> +    struct cloudabi_sys_sock_listen_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_sock_shutdown(struct thread *td,
> +    struct cloudabi_sys_sock_shutdown_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_sock_stat_get(struct thread *td,
> +    struct cloudabi_sys_sock_stat_get_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi/cloudabi_syscalldefs.h
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_syscalldefs.h     Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,40 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + *
> + * $FreeBSD$
> + */
> +
> +#ifndef _CLOUDABI_SYSCALLDEFS_H_
> +#define        _CLOUDABI_SYSCALLDEFS_H_
> +
> +#include <sys/types.h>
> +
> +#define        alignas         _Alignas
> +#define        alignof         _Alignof
> +#define        static_assert   _Static_assert
> +
> +/* Import machine-independent CloudABI definitions. */
> +#include <contrib/cloudabi/syscalldefs_mi.h>
> +
> +#endif
>
> Added: head/sys/compat/cloudabi/cloudabi_thread.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi/cloudabi_thread.c  Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,47 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi/cloudabi_proto.h>
> +
> +int
> +cloudabi_sys_thread_exit(struct thread *td,
> +    struct cloudabi_sys_thread_exit_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi_sys_thread_yield(struct thread *td,
> +    struct cloudabi_sys_thread_yield_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi64/Makefile
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi64/Makefile Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,12 @@
> +# $FreeBSD$
> +
> +all:
> +       @echo "make sysent only"
> +
> +sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \
> +    cloudabi64_syscalls.c cloudabi64_systrace_args.c
> +
> +cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \
> +    cloudabi64_syscalls.c cloudabi64_systrace_args.c: \
> +    ../../kern/makesyscalls.sh syscalls.master syscalls.conf
> +       sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
>
> Added: head/sys/compat/cloudabi64/cloudabi64_fd.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi64/cloudabi64_fd.c  Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,66 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi64/cloudabi64_syscalldefs.h>
> +#include <compat/cloudabi64/cloudabi64_proto.h>
> +
> +int
> +cloudabi64_sys_fd_pread(struct thread *td,
> +    struct cloudabi64_sys_fd_pread_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi64_sys_fd_pwrite(struct thread *td,
> +    struct cloudabi64_sys_fd_pwrite_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi64_sys_fd_read(struct thread *td,
> +    struct cloudabi64_sys_fd_read_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi64_sys_fd_write(struct thread *td,
> +    struct cloudabi64_sys_fd_write_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi64/cloudabi64_poll.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi64/cloudabi64_poll.c        Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,38 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi64/cloudabi64_syscalldefs.h>
> +#include <compat/cloudabi64/cloudabi64_proto.h>
> +
> +int
> +cloudabi64_sys_poll(struct thread *td, struct cloudabi64_sys_poll_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi64/cloudabi64_sock.c
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi64/cloudabi64_sock.c        Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,48 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + */
> +
> +#include <sys/cdefs.h>
> +__FBSDID("$FreeBSD$");
> +
> +#include <compat/cloudabi64/cloudabi64_syscalldefs.h>
> +#include <compat/cloudabi64/cloudabi64_proto.h>
> +
> +int
> +cloudabi64_sys_sock_recv(struct thread *td,
> +    struct cloudabi64_sys_sock_recv_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
> +
> +int
> +cloudabi64_sys_sock_send(struct thread *td,
> +    struct cloudabi64_sys_sock_send_args *uap)
> +{
> +
> +       /* Not implemented. */
> +       return (ENOSYS);
> +}
>
> Added: head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/compat/cloudabi64/cloudabi64_syscalldefs.h Thu Jul  9 07:20:15 2015        (r285307)
> @@ -0,0 +1,45 @@
> +/*-
> + * Copyright (c) 2015 Nuxi, https://nuxi.nl/
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> + * 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.
> + *
> + * $FreeBSD$
> + */
> +
> +#ifndef _CLOUDABI64_SYSCALLDEFS_H_
>
> *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
>


More information about the svn-src-all mailing list