freebsd-nq/sys/compat
Ed Schouten 2491302a04 Add implementations for some of the CloudABI file descriptor system calls.
All of the CloudABI system calls that operate on file descriptors of an
arbitrary type are prefixed with fd_. This change adds wrappers for
most of these system calls around their FreeBSD equivalents.

The dup2() system call present on CloudABI deviates from POSIX, in the
sense that it can only be used to replace existing file descriptor. It
cannot be used to create new ones. The reason for this is that this is
inherently thread-unsafe. Furthermore, there is no need on CloudABI to
use fixed file descriptor numbers. File descriptors 0, 1 and 2 have no
special meaning.

This change exposes the kern_dup() through <sys/syscallsubr.h> and puts
the FDDUP_* flags in <sys/filedesc.h>. It then adds a new flag,
FDDUP_MUSTREPLACE to force that file descriptors are replaced -- not
allocated.

Differential Revision:	https://reviews.freebsd.org/D3035
Reviewed by:	mjg
2015-07-09 16:07:01 +00:00
..
cloudabi Add implementations for some of the CloudABI file descriptor system calls. 2015-07-09 16:07:01 +00:00
cloudabi64 Generate CloudABI system call table with proper $FreeBSD$ tags. 2015-07-09 07:21:33 +00:00
freebsd32 On exec, single-threading must be enforced before arguments space is 2015-05-10 09:00:40 +00:00
ia32 In preparation for switching linuxulator to the use the native 1:1 2015-05-24 14:51:29 +00:00
linprocfs Provide vnode in memory map info for files on tmpfs 2015-06-02 18:37:04 +00:00
linsysfs Introduce a new module linux_common.ko which is intended for the 2015-05-24 15:51:18 +00:00
linux fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
ndis CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
netbsd Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
svr4 svr4 emulator has custom sendsig() implementation, it does not use 2015-06-29 10:33:04 +00:00
x86bios Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00