History log of /freebsd-10-stable/sys/sys/unistd.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 312171 14-Jan-2017 kib

MFC r311646:
Define _POSIX_PRIORITY_SCHEDULING as 0, to account for the kernel option.


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 239347 17-Aug-2012 davidxu

Implement syscall clock_getcpuclockid2, so we can get a clock id
for process, thread or others we want to support.
Use the syscall to implement POSIX API clock_getcpuclock and
pthread_getcpuclockid.

PR: 168417


# 232776 10-Mar-2012 kib

Add brackets around bare '-1' used as the macro body.

Noted by: bde
MFC after: 1 week


# 227341 08-Nov-2011 jhb

Claim that _POSIX_ADVISORY_INFO is fully supported since posix_fadvise()
was added.

Submitted by: avilla
Discussed with: wollman


# 224987 18-Aug-2011 jonathan

Add experimental support for process descriptors

A "process descriptor" file descriptor is used to manage processes
without using the PID namespace. This is required for Capsicum's
Capability Mode, where the PID namespace is unavailable.

New system calls pdfork(2) and pdkill(2) offer the functional equivalents
of fork(2) and kill(2). pdgetpid(2) allows querying the PID of the remote
process for debugging purposes. The currently-unimplemented pdwait(2) will,
in the future, allow querying rusage/exit status. In the interim, poll(2)
may be used to check (and wait for) process termination.

When a process is referenced by a process descriptor, it does not issue
SIGCHLD to the parent, making it suitable for use in libraries---a common
scenario when using library compartmentalisation from within large
applications (such as web browsers). Some observers may note a similarity
to Mach task ports; process descriptors provide a subset of this behaviour,
but in a UNIX style.

This feature is enabled by "options PROCDESC", but as with several other
Capsicum kernel features, is not enabled by default in GENERIC 9.0.

Reviewed by: jhb, kib
Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


# 223966 12-Jul-2011 kib

Implement an RFTSIGZMB flag to rfork(2) to specify a signal that is
delivered to parent when the child exists.

Submitted by: Petr Salinger <Petr.Salinger seznam cz> (Debian/kFreeBSD)
MFC after: 1 week
X-MFC-note: bump __FreeBSD_version


# 212852 19-Sep-2010 tijl

Indicate that POSIX semaphores are always supported.

Reported by: avilla
Reviewed by: davidxu
Approved by: kib (mentor)


# 194955 25-Jun-2009 trasz

Add NFSv4 ACL support to libc.

This adds the following functions to the acl(3) API: acl_add_flag_np,
acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np,
acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np,
acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np,
acl_strip_np, acl_get_brand_np. Most of them are similar to what Darwin
does. There are no backward-incompatible changes.

Approved by: rwatson@


# 187945 31-Jan-2009 trhodes

Fix a typo in a comment.


# 168471 07-Apr-2007 pjd

Hide SEEK_DATA and SEEK_HOLE under __BSD_VISIBLE.

Suggested by: ache


# 168469 07-Apr-2007 pjd

- Remove SEEK_DATA and SEEK_HOLE from stdio.h, they don't belong here.
- Only define SEEK_DATA and SEEK_HOLE in sys/unistd.h when neither
_POSIX_SOURCE nor _XOPEN_SOURCE is defined.

Pointed out by: bde, ache


# 168397 05-Apr-2007 pjd

Implement SEEK_DATA and SEEK_HOLE extensions to lseek(2) as found in
OpenSolaris. For more information please refer to:

http://blogs.sun.com/bonwick/entry/seek_hole_and_seek_data


# 153006 02-Dec-2005 davidxu

messqge queue has been implemented, set _POSIX_MESSAGE_PASSING to 200112L.


# 153004 02-Dec-2005 davidxu

We've already implemented all TMO functions, set _POSIX_TIMEOUTS to 200112L.


# 151872 30-Oct-2005 davidxu

Change POSIX_TIMERS to 200112L.


# 151659 25-Oct-2005 wollman

We've supported the _POSIX_MONOTONIC_CLOCK option for a long time.
Advertise it.

MFC after: 1 week


# 151578 23-Oct-2005 davidxu

Change _POSIX_REALTIME_SIGNALS to 200112L to indicates we support
realtime signals. Define missing _POSIX_TIMERS, it will be changed to
200112L once struct sigevent is fixed.


# 139825 07-Jan-2005 imp

/* -> /*- for license, minor formatting changes


# 127976 07-Apr-2004 imp

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core


# 106055 27-Oct-2002 wollman

Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys. Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong. They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago. (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)


# 105789 23-Oct-2002 phk

Only define SEEK_{SET,CUR,END} if not already defined (by <stdio.h>)


# 105572 20-Oct-2002 rwatson

Rename _POSIX_FOO_PRESENT and friends from POSIX.1e to _PC_FOO_PRESENT
and related friends. This would have been corrected had POSIX.1e
progressed to a standard.

Pointed out by: wollman


# 105566 20-Oct-2002 rwatson

Correct mis-spelling in pathconf constant _POSIX_ACL_CAP_PRESENT to
be the more correct _POSIX_CAP_PRESENT.


# 105045 13-Oct-2002 mike

Move the _POSIX_VERSION constant from <unistd.h> to <sys/unistd.h>, so
that it can be used in-kernel for a sysctl.


# 103768 21-Sep-2002 bde

Whitespace fixes (mainly for many more messes in the definitions of the
rfork() constants).


# 103731 21-Sep-2002 wollman

Claim to be 1003.1-2001. We're not quite, yet, but that's a more useful
target than any pre-C99 POSIX (which we could never have conformed to
under our ia32 ABI).

Document why HOST_NAME_MAX (and hopefully other similar constants in the
future) is not defined.

Define in <sys/unistd.h> all 1003.1-2001 option and option group constants
which did not meet the standard for inclusion in <unistd.h>. Delete from
<sys/unistd.h> all sysconf(3) constants and those option constants which
were moved to <unistd.h>. pathconf(3) keys remain here as pathconf() is
implemented directly as a system call. Add a comment noting brokenness
in some .1e additions here. Fix whitespace in definition of constants for
rfork().

(5 of 5)


# 101071 31-Jul-2002 rwatson

Add pathconf/fpathconf entries from POSIX.1e indicating support for
ACLs, Capabilities, Information Labels, and MAC Labels on the
queried file system.


# 100147 15-Jul-2002 wollman

Move _CS_PATH from <sys/unistd.h> to <unistd.h> -- the kernel isn't involved
in confstr() processing.


# 100141 15-Jul-2002 wollman

Define _POSIX_FSYNC unconditionally. (The standard has enough weasel-words
to allow us to claim compliance.) Define a few other nearby feature tests
in the way required by 1003.1-2001.


# 88157 18-Dec-2001 jhb

Make RFPPWAIT a kernel-only flag. Programs desiring this feature should
use vfork() rather than manually invoking rfork().


# 87161 01-Dec-2001 jkoshy

Add support for sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN).
This API is supported in SVR4.0MP, Solaris, Linux, AIX and Tru64 Unix.

PR: bin/27489
Submitted by: Arun Sharma <arun@sharma-home.net>
Reviewed by: bde (prior version)


# 78431 18-Jun-2001 wollman

After one too many PRs on the subject, bite the bullet and define IOV_MAX
and its associated constants. Implement _SC_IOV_MAX in the usual way.
Be a bit sloppy about the namespace question; this should get cleared up
in time for 5.0.

MFC after: 1 month


# 74192 13-Mar-2001 des

Don't allow userland to use the RFHIGHPID flag. Its only purpose is to
reserve low pids for system daemons during boot.


# 65557 06-Sep-2000 jasone

Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The
alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
preempted (i386 only).

Partially contributed by: BSDi (BSD/OS)
Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh


# 59496 22-Apr-2000 wollman

Implement POSIX.1b shared memory objects. In this implementation,
shared memory objects are regular files; the shm_open(3) routine
uses fcntl(2) to set a flag on the descriptor which tells mmap(2)
to automatically apply MAP_NOSYNC.

Not objected to by: bde, dillon, dufault, jasone


# 58127 16-Mar-2000 jasone

Add the _POSIX_SEMAPHORES feature flag.


# 54731 17-Dec-1999 jasone

Note that the PR associated with the previous log message is i386/7426,
not bin/8281.


# 54699 16-Dec-1999 jasone

Move POSIX feature constants from pthread.h to unistd.h, as required by
1003.1c-1995.

Undefine _POSIX_THREAD_SAFE_FUNCTIONS, since we do not implement all of the
necessary interfaces. At least getgrgid_r(), getrnam_r(), getpwuid_r(),
getpwnam_r(), getc_unlocked(), getchar_unlocked(), putc_unlocked(),
and putchar_unlocked() are missing. Due to a likely typo in 1003.1c-1995,
we are not technically allowed to define _POSIX_THREADS without defining
_POSIX_THREAD_SAFE_FUNCTIONS, but either way we're non-compliant, so I'm
leaving _POSIX_THREADS defined.

PR: bin/8281


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 42379 07-Jan-1999 julian

Changes to the LINUX_THREADS support to only allocate extra memory for
shared signal handling when there is shared signal handling being
used.

This removes the main objection to making the shared signal handling
a standard ability in rfork() and friends and 'unconditionalising'
this code. (i.e. the allocation of an extra 328 bytes per process).

Signal handling information remains in the U area until such a time as
it's reference count would be incremented to > 1. At that point a new
struct is malloc'd and maintained in KVM so that it can be shared between
the processes (threads) using it.

A function to check the reference count and move the struct back to the U
area when it drops back to 1 is also supplied. Signal information is
therefore now swapable for all processes that are not sharing that
information with other processes. THis should addres the concerns raised
by Garrett and others.

Submitted by: "Richard Seaman, Jr." <dick@tar.com>


# 41931 19-Dec-1998 julian

Reviewed by: Luoqi Chen, Jordan Hubbard
Submitted by: "Richard Seaman, Jr." <lists@tar.com>
Obtained from: linux :-)

Code to allow Linux Threads to run under FreeBSD.

By default not enabled
This code is dependent on the conditional
COMPAT_LINUX_THREADS (suggested by Garret)
This is not yet a 'real' option but will be within some number of hours.


# 34925 28-Mar-1998 dufault

Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work. Changes:

Change all "posix4" to "p1003_1b". Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.


# 34319 08-Mar-1998 dufault

Reviewed by: bde

Changes to support building with _POSIX_SOURCE set to 199309L:

1. Add sys/_posix.h to handle those preprocessor defs that POSIX
says have effects when defined before including any header files;

2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE

3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now
defined in POSIX. These show up when:

_POSIX_SOURCE and _POSIX_C_SOURCE are not set or
_POSIX_C_SOURCE is set >= 199309L

and vanish when:

_POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L.

4. Explain these in man 9 posix4;

5. Include _posix.h and conditionalize on new feature test.


# 34030 04-Mar-1998 dufault

Reviewed by: msmith, bde long ago
POSIX.4 headers and sysctl variables. Nothing should change
unless POSIX4 is defined or _POSIX_VERSION is set to 199309.


# 26671 15-Jun-1997 dyson

Modifications to existing files to support the initial AIO/LIO and
kernel based threading support.


# 22975 22-Feb-1997 peter

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 20640 18-Dec-1996 bde

Restored comment about _POSIX_SAVED_IDS from rev.1.2.


# 20177 06-Dec-1996 ache

Turn off _POSIX_SAVED_IDS


# 20019 29-Nov-1996 bde

Changed _POSIX_VERSION from 198808L to 199009L. We're close to conforming
to the 1990 version according to NIST-PCTS. Many man pages still refer to
the 1988 version.


# 18017 03-Sep-1996 bde

Don't pollute the namespace with rfork flags if _POSIX_SOURCE is defined.


# 17704 20-Aug-1996 smpatel

Sync rfork() flags up with OpenBSD.

Suggested by: Theo de Raadt <deraadt@theos.com>


# 15277 17-Apr-1996 smpatel

Implement the RFNOWAIT flag for rfork(). If set this flag will cause the
forked child to be dissociated from the parent).

Cleanup fork1(), implement vfork() and fork() in terms of rfork() flags.

Remove RFENVG, RFNOTEG, RFCNAMEG, RFCENVG which are Plan9 specific and cannot
possibly be implemented in FreeBSD.

Renumbered the flags to make up for the removal of the above flags.

Reviewed by: peter, smpatel
Submitted by: Mike Grupenhoff <kashmir@umiacs.umd.edu>


# 14222 23-Feb-1996 peter

Garrett pointed out that the correct place for unix system call args
is <sys/unistd.h>, with the prototype in <unistd.h>. sys/unistd.h
is visible to the kernel compile, and is #included by unistd.h.

Also, I missed a reference to a static int in the midst of my other diffs.


# 8449 11-May-1995 bde

Define _POSIX_VDISABLE so that it can be used in #if expressions.


# 8167 29-Apr-1995 ache

Enable _POSIX_SAVED_IDS and fix comment to describe current situation


# 1817 02-Aug-1994 dg

Added $Id$


# 1542 24-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1541,
which included commits to RCS files with non-trunk default branches.


# 1541 24-May-1994 rgrimes

BSD 4.4 Lite Kernel Sources