MFC r228862, 228880, 228882, 228906, 228977, 229332, 229575, 229591, 229704,
229716, 230062, 230225, 230267, 234958

This brings stdatomic.h into -STABLE and includes improvements to tgmath.h that
significantly decrease compile times on a C11 compiler (such as the clang in
the base system).


git-svn-id: svn://svn.freebsd.org/base/stable/9@236326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235459 and r235471

r235459:
 Implement the DTrace sched provider.  This implementation aims to be
 compatible with the sched provider implemented by Solaris and its open-
 source derivatives.  Full documentation of the sched provider can be found
 on Oracle's DTrace wiki pages.

 Note that for compatibility with scripts originally written for Solaris,
 serveral probes are defined that will never fire.  These probes are defined
 to fire when Solaris-specific features perform certain actions.  As these
 features are not present in FreeBSD, the probes can never fire.

 Also, I have added a two probes that are not defined in Solaris, lend-pri
 and load-change.  These probes have been added to make it possible to
 collect schedgraph data with DTrace.

 Finally, a few probes are defined in Solaris to take a cpuinfo_t *
 argument.  As it was not immediately clear to me how to translate that to
 FreeBSD, currently those probes are passed NULL in place of a cpuinfo_t *.

 Sponsored by: Sandvine Incorporated

r235471:
 Fix typo in function name SDT_PROBE4 and unbreak 4BSD UP.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235842

Mention the upper hard limit for -n option.  Patch slightly modified
from PR version.

PR:		168255
Submitted by:	Andy Kosela
Approved by:	gjb (mentor)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235204:
	Add some missing files to OLD_FILES

PR:		conf/166460
Approved by:	cperciva (implicit)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235949, r236198:

   Don't try to set a null TERM environment.

   When writing the jid via the -i flag, do it right when the jail is created,
   before any commands run.  /etc/rc.d/jail depends on this.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236356 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235678:

"nvram,flash" may not be the first in the compatible list property of the
nvram ofw node, so check all strings in the list.

Approved by:	nwhitehorn (mentor)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFV r236171, MFC r236196:

Upgrade to BIND version 9.8.3, the latest from ISC.

Feature Change

*  BIND now recognizes the TLSA resource record type, created to
   support IETF DANE (DNS-based Authentication of Named Entities)

Bug Fix

*  The locking strategy around the handling of iterative queries
   has been tuned to reduce unnecessary contention in a multi-
   threaded environment.

Other critical bug fixes are included.

All BIND users are encouraged to upgrade.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235481:
	Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent
	socket path if running

PR:		167932
Approved by:	cperciva (implicit)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236260:

Pull in r156591 from upstream llvm trunk:

  Allow unique_file to take a mode for file permissions, but default
  to user only read/write.

and r156592 from upstream clang trunk:

  For final output files create them with mode 0664 to match other
  compilers and expected defaults.

This should fix clang creating files with mode 0600.

Reported by:	James <james@hicag.org>


git-svn-id: svn://svn.freebsd.org/base/stable/9@236385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235725:
Update usb.conf.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236242:
Add AHCI quirk.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236390 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236220,236221:
- Fix the problem acpi_sleep_force() hang.
- Reorder resume procedures to avoid hang during AcpiLeaveSleepState()
  execution.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r235266:
According to SUSv4, realpath(3) must fail if
  [ENOENT]  A component of file_name does not name an existing file or
      file_name points to an empty string.
  [ENOTDIR] A component of the path prefix is not a directory, or the
      file_name argument contains at least one non- <slash> character
      and ends with one or more trailing <slash> characters and the last
      pathname component names an existing file that is neither a
      directory nor a symbolic link to a directory.
Add checks for the listed conditions, and set errno accordingly.

Update the realpath(3) manpage to mention SUS behaviour. Remove the
requirement to include sys/param.h before stdlib.h.

PR:	128933


git-svn-id: svn://svn.freebsd.org/base/stable/9@236400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC:	r236251

Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
and reset statistics as it should.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236410 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 236212:

  Update mxge(4) firmware to the latest version available from
  Myricom (1.4.55).

  Sponored by: Myricom, Inc.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236274, r236278, r236279:

r236274:
 - Fix an mdoc(7) formatting nit.

r236278:
 - Fix mdoc(7) style nits.

r236279:
 - Add '-width Pa' to src.conf.5 for mdoc(7) style consistency.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236312:
Clarify that the v_lockf is advisory lock list.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r236313:
Capitalize start of sentence.


git-svn-id: svn://svn.freebsd.org/base/stable/9@236446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: 228545,229572

Modify pw_copy:
- if pw is NULL and oldpw is not NULL then the oldpw is deleted
- if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid
then it renames the user

add new gr_* functions so now gr_util API is similar to pw_util API,
this allow to manipulate groups in a safe way.

Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd

Approved by:	des (mentor)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
RFC: 235276

- Print package name in case an empty pkgdep line is found.

PR:		bin/164378
Submitted by:	Yuri <yuri AT tsoft.com> and many others
Approved by:	des (mentor)


git-svn-id: svn://svn.freebsd.org/base/stable/9@236453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f