commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnumach] 02/03: Imported Upstream version 1.5+git20150728


From: Samuel Thibault
Subject: [gnumach] 02/03: Imported Upstream version 1.5+git20150728
Date: Tue, 28 Jul 2015 19:32:08 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch master
in repository gnumach.

commit 8879282632377c0f23131f307bd103ac8b4daf96
Author: Samuel Thibault <address@hidden>
Date:   Tue Jul 28 18:48:52 2015 +0000

    Imported Upstream version 1.5+git20150728
---
 ChangeLog                        | 126 ++++++++++++++++++++++
 Makefile.in                      | 102 ++++++++++--------
 Makerules.am                     |   2 +-
 aclocal.m4                       |  57 +++++-----
 configfrag.ac                    |   2 +-
 configure                        |  30 +++---
 doc/mach.info                    |   4 +-
 doc/mach.info-1                  |  14 +--
 doc/mach.info-2                  | 228 +++++++++++++++++++--------------------
 doc/stamp-vti                    |   4 +-
 doc/version.texi                 |   4 +-
 i386/intel/pmap.c                |   2 +-
 include/mach/time_value.h        |  31 ++++--
 ipc/ipc_entry.c                  |  21 +---
 ipc/ipc_object.c                 |  32 +++---
 ipc/ipc_space.h                  |  20 ++--
 ipc/ipc_table.c                  |  15 +--
 kern/bootstrap.c                 |   4 +
 kern/lock.c                      |  14 +--
 kern/lock.h                      |  35 ++++--
 kern/mach_clock.c                |  36 ++++++-
 kern/mach_clock.h                |  11 +-
 kern/printf.c                    |  33 ------
 kern/printf.h                    |   2 -
 kern/slab.c                      |   2 +-
 kern/startup.c                   |   2 -
 kern/task.c                      |   3 +-
 kern/thread.c                    |   3 +-
 linux/src/drivers/net/pci-scan.c |   2 +-
 version.m4                       |   2 +-
 vm/vm_pageout.c                  |   2 +-
 31 files changed, 503 insertions(+), 342 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3ef22c4..0b4d770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,129 @@
+2015-07-25  Justus Winter  <address@hidden>
+
+       kern: add boot-time clock, use it for time stamps
+       The kernel keeps track of task and thread creation times by saving a
+       time stamp.  Previously, the real-time clock was used for this.  When
+       the real-time clock is changed, however, the reference frame for the
+       time stamps is lost.  This surfaced in Hurd systems reporting
+       spuriously long uptimes.
+
+       Fix this by creating a boot-time clock and use it as reference frame
+       for the time stamps.
+
+       * kern/mach_clock.c (clock_boottime_offset): Create clock by keeping
+       track of the offset from the real-time.
+       (clock_boottime_update): New function.
+       (record_time_stamp): Use the boot-time clock for time stamps.
+       (read_time_stamp): New function to convert it back to real-time.
+       (host_set_time): Call `clock_boottime_update'.
+       * kern/mach_clock.h (record_time_stamp): Amend comment.
+       (read_time_stamp): New declaration.
+       * kern/task.c (task_info): Use `read_time_stamp'.
+       * kern/thread.c (thread_info): Likewise.
+
+2015-07-25  Justus Winter  <address@hidden>
+
+       include: provide time-value substraction
+       * include/mach/time_value.h (time_value_assert): New macro to assert
+       that the given value is well-formed.
+       (time_value_add_usec): Use the new macro.
+       (time_value_sub_usec): New macro.
+       (time_value_add): Use `time_value_add_usec'.
+       (time_value_sub_usec): New macro.
+
+       kern/lock: make sure the macros are only used on simple locks
+       * kern/lock.h (struct slock, simple_lock_data_empty): Add field
+       `is_a_simple_lock'.
+       (simple_lock_assert): New macro that tests for `is_a_simple_lock'.
+       Use this macro to assert that the arguments to various other macros
+       are indeed simple locks.
+
+       Disable the kernel tracing system XPR
+       * configfrag.ac (XPR_DEBUG): Disable tracing system.
+
+       ipc/space: inline reference counting
+       * ipc/ipc_space.h (is_{reference,release}): Use the macro variant.
+
+       Make sure the field offsets are updated
+       * Makerules.am: Make sure the field offsets are updated.
+
+2015-07-20  Justus Winter  <address@hidden>
+
+       kern/bootstrap: deallocate thread
+       Previously, killing the thread would fail because of the extra
+       reference, making task_terminate loop forever.
+
+       * kern/bootstrap.c (boot_script_exec_command): Deallocate thread.
+
+2015-07-19  Justus Winter  <address@hidden>
+
+       kern/bootstrap: deallocate task
+       * kern/bootstrap.c (boot_script_free_task): Deallocate task.
+
+2015-07-18  Justus Winter  <address@hidden>
+
+       linux/net: fix build with -O0
+       * linux/src/drivers/net/pci-scan.c: Avoid #erroring out.
+
+2015-07-18  Justus Winter  <address@hidden>
+
+       kern/printf: do not serialize printf and co
+       A lot of code assumes that printf is re-entrant, e.g. the pagination
+       code in the debugger, or any use of assert inside the console driver.
+
+       * kern/printf.c: Drop the lock serializing calls to `_doprnt'.
+       (printf_init): Remove function.
+       * kern/printf.h (printf_init): Remove declaration.
+       * kern/startup.c (setup_main): Remove call to `printf_init'.
+
+2015-07-18  Justus Winter  <address@hidden>
+
+       kern/lock: use compiler built-in functions to get return address
+       * kern/lock.c (struct simple_locks_info): Fix type of `ra'.
+       (simple_lock, simple_lock_try): Use compiler built-in functions to get
+       return address.
+
+       kern/bootstrap: fix locking
+       * kern/bootstrap.c (boot_script_exec_cmd): Add missing unlock.
+       (user_bootstrap): Likewise.
+
+       kern/slab: fix locking
+       * kern/slab.c (host_slab_info): Fix locking.
+
+2015-07-15  Justus Winter  <address@hidden>
+
+       ipc: use a general lock to protect IPC spaces
+       This fixes a corruption in the radix trees representing the IPC spaces
+       when memory was tight.
+
+       * ipc/ipc_space.h: Use a general lock to protect IPC spaces.
+
+2015-07-15  Justus Winter  <address@hidden>
+
+       ipc: fix the locking of the IPC entry allocation functions
+       * ipc/ipc_entry.c (ipc_entry_alloc): Assume the space is write-locked.
+       (ipc_entry_alloc_name): Likewise.
+       * ipc/ipc_object.c: Fix the locking around all call sites to the two
+       functions where the space was not locked before.
+
+       i386: fix typo
+       * i386/intel/pmap.c: Fix typo.
+
+2015-07-12  Justus Winter  <address@hidden>
+
+       ipc: avoid kmem_alloc
+       * ipc/ipc_table.c (ipc_table_alloc): Unconditionally use `kalloc'.
+       (ipc_table_free): Unconditionally use `kfree'.
+
+2015-07-12  Justus Winter  <address@hidden>
+
+       vm: really fix traversing the list of inactive pages
+       Previously, the pageout code traversed the list of pages in an object
+       instead of the list of inactive pages.
+
+       * vm/vm_pageout.c (vm_pageout_scan): Fix traversing the list of
+       inactive pages.
+
 2015-07-11  Justus Winter  <address@hidden>
 
        kern: make sure the queue macros are only used on queues
diff --git a/Makefile.in b/Makefile.in
index 1d3671b..ffd48f6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -296,7 +296,17 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -366,29 +376,6 @@ noinst_PROGRAMS = gnumach.o$(EXEEXT)
 @address@hidden = \
 @disable_smashing_stack_protector_TRUE@        -fno-stack-protector
 
-DIST_COMMON = $(srcdir)/Makerules.am $(srcdir)/Makerules.mig.am \
-       $(srcdir)/Makefrag.am $(srcdir)/linux/Makefrag.am \
-       $(srcdir)/i386/linux/Makefrag.am $(srcdir)/xen/Makefrag.am \
-       $(srcdir)/i386/Makefrag.am $(srcdir)/i386/xen/Makefrag.am \
-       $(srcdir)/tests/Makefrag.am $(srcdir)/doc/Makefrag.am INSTALL \
-       NEWS README AUTHORS ChangeLog $(srcdir)/Makefile.in \
-       $(srcdir)/Makefile.am $(top_srcdir)/configure \
-       $(am__configure_deps) $(srcdir)/config.h.in \
-       $(top_srcdir)/tests/test-mbchk.in $(srcdir)/version.c.in \
-       $(top_srcdir)/build-aux/depcomp \
-       $(top_srcdir)/build-aux/mdate-sh $(srcdir)/doc/version.texi \
-       $(srcdir)/doc/stamp-vti $(top_srcdir)/build-aux/texinfo.tex \
-       $(include_device_HEADERS) $(include_mach_HEADERS) \
-       $(include_mach_debug_HEADERS) $(include_mach_eXec_HEADERS) \
-       $(am__include_mach_i386_HEADERS_DIST) \
-       $(top_srcdir)/build-aux/test-driver COPYING build-aux/compile \
-       build-aux/config.guess build-aux/config.sub build-aux/depcomp \
-       build-aux/install-sh build-aux/mdate-sh build-aux/missing \
-       build-aux/texinfo.tex $(top_srcdir)/build-aux/compile \
-       $(top_srcdir)/build-aux/config.guess \
-       $(top_srcdir)/build-aux/config.sub \
-       $(top_srcdir)/build-aux/install-sh \
-       $(top_srcdir)/build-aux/missing
 
 # Do we want the icky kernel debugger?
 @address@hidden = \
@@ -1186,6 +1173,12 @@ am__aclocal_m4_deps = $(top_srcdir)/version.m4 \
        $(top_srcdir)/linux/configfrag.ac $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(srcdir)/doc/version.texi \
+       $(srcdir)/doc/stamp-vti $(include_device_HEADERS) \
+       $(include_mach_HEADERS) $(include_mach_debug_HEADERS) \
+       $(include_mach_eXec_HEADERS) \
+       $(am__include_mach_i386_HEADERS_DIST) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -2261,6 +2254,25 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log)
 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
        $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefrag.am \
+       $(srcdir)/Makerules.am $(srcdir)/Makerules.mig.am \
+       $(srcdir)/config.h.in $(srcdir)/doc/Makefrag.am \
+       $(srcdir)/i386/Makefrag.am $(srcdir)/i386/linux/Makefrag.am \
+       $(srcdir)/i386/xen/Makefrag.am $(srcdir)/linux/Makefrag.am \
+       $(srcdir)/tests/Makefrag.am $(srcdir)/version.c.in \
+       $(srcdir)/xen/Makefrag.am $(top_srcdir)/build-aux/compile \
+       $(top_srcdir)/build-aux/config.guess \
+       $(top_srcdir)/build-aux/config.sub \
+       $(top_srcdir)/build-aux/depcomp \
+       $(top_srcdir)/build-aux/install-sh \
+       $(top_srcdir)/build-aux/mdate-sh \
+       $(top_srcdir)/build-aux/missing \
+       $(top_srcdir)/build-aux/test-driver \
+       $(top_srcdir)/build-aux/texinfo.tex \
+       $(top_srcdir)/tests/test-mbchk.in AUTHORS COPYING ChangeLog \
+       INSTALL NEWS README build-aux/compile build-aux/config.guess \
+       build-aux/config.sub build-aux/depcomp build-aux/install-sh \
+       build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -2950,7 +2962,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am 
$(srcdir)/Makerules.am $(srcdir)/M
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -2960,7 +2971,7 @@ Makefile: $(srcdir)/Makefile.in 
$(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ 
$(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ 
$(am__depfiles_maybe);; \
        esac;
-$(srcdir)/Makerules.am $(srcdir)/Makerules.mig.am $(srcdir)/Makefrag.am 
$(srcdir)/linux/Makefrag.am $(srcdir)/i386/linux/Makefrag.am 
$(srcdir)/xen/Makefrag.am $(srcdir)/i386/Makefrag.am 
$(srcdir)/i386/xen/Makefrag.am $(srcdir)/tests/Makefrag.am 
$(srcdir)/doc/Makefrag.am:
+$(srcdir)/Makerules.am $(srcdir)/Makerules.mig.am $(srcdir)/Makefrag.am 
$(srcdir)/linux/Makefrag.am $(srcdir)/i386/linux/Makefrag.am 
$(srcdir)/xen/Makefrag.am $(srcdir)/i386/Makefrag.am 
$(srcdir)/i386/xen/Makefrag.am $(srcdir)/tests/Makefrag.am 
$(srcdir)/doc/Makefrag.am $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
@@ -6790,15 +6801,16 @@ $(srcdir)/doc/stamp-vti: doc/mach.texi 
$(top_srcdir)/configure
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
-       echo "@set VERSION $(VERSION)") > vti.tmp
-       @cmp -s vti.tmp $(srcdir)/doc/version.texi \
-         || (echo "Updating $(srcdir)/doc/version.texi"; \
-             cp vti.tmp $(srcdir)/doc/version.texi)
-       address@hidden -f vti.tmp
+       echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
+       (cmp -s vti.tmp$$$$ $(srcdir)/doc/version.texi \
+         || (echo "Updating $(srcdir)/doc/version.texi" && \
+             cp vti.tmp$$$$ $(srcdir)/doc/version.texi.tmp$$$$ && \
+             mv $(srcdir)/doc/version.texi.tmp$$$$ 
$(srcdir)/doc/version.texi)) && \
+       rm -f vti.tmp$$$$ $(srcdir)/doc/version.texi.$$$$
        @cp $(srcdir)/doc/version.texi $@
 
 mostlyclean-vti:
-       -rm -f vti.tmp
+       -rm -f vti.tmp* $(srcdir)/doc/version.texi.tmp*
 
 maintainer-clean-vti:
        -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi
@@ -7158,7 +7170,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        if test -n "$$am__remaking_logs"; then \
          echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
               "recursion detected" >&2; \
-       else \
+       elif test -n "$$redo_logs"; then \
          am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
        fi; \
        if $(am__make_dryrun); then :; else \
@@ -7374,15 +7386,15 @@ dist-xz: distdir
        $(am__post_remove_distdir)
 
 dist-tarZ: distdir
-       @echo WARNING: "Support for shar distribution archives is" \
-                      "deprecated." >&2
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 dist-shar: distdir
-       @echo WARNING: "Support for distribution archives compressed with" \
-                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
@@ -7418,17 +7430,17 @@ distcheck: dist
        esac
        chmod -R a-w $(distdir)
        chmod u+w $(distdir)
-       mkdir $(distdir)/_build $(distdir)/_inst
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
        chmod a-w $(distdir)
        test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure \
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
-           --srcdir=.. --prefix="$$dc_install_base" \
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -7803,9 +7815,11 @@ uninstall-am: uninstall-dvi-am 
uninstall-exec_bootPROGRAMS \
        uninstall-include_mach_i386HEADERS uninstall-info-am \
        uninstall-pdf-am uninstall-ps-am
 
+.PRECIOUS: Makefile
+
 %.symc: %.sym gensym.awk
        $(AWK_V) $(AWK) -f $(word 2,$^) $< > $@
-%.symc.o: %.symc
+%.symc.o: %.symc config.h
        $(AM_V_CC) $(COMPILE) -S -x c -o $@ $<
 %.h: %.symc.o
        $(AM_V_GEN) sed < $< > $@               \
diff --git a/Makerules.am b/Makerules.am
index b1f17d1..5106fef 100644
--- a/Makerules.am
+++ b/Makerules.am
@@ -21,7 +21,7 @@ EXTRA_DIST += \
        gensym.awk
 %.symc: %.sym gensym.awk
        $(AWK_V) $(AWK) -f $(word 2,$^) $< > $@
-%.symc.o: %.symc
+%.symc.o: %.symc config.h
        $(AM_V_CC) $(COMPILE) -S -x c -o $@ $<
 %.h: %.symc.o
        $(AM_V_GEN) sed < $< > $@               \
diff --git a/aclocal.m4 b/aclocal.m4
index 9ce1375..f3cdf4c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  It may work, but is 
not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 
'autoreconf'.])])
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, 
typically 'autoreconf'.])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, 
[_AM_DEPENDENCIES([CCAS])])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -428,7 +428,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -518,8 +518,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -593,6 +593,9 @@ END
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
 fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
@@ -622,7 +625,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" 
>`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -633,7 +636,7 @@ echo "timestamp for $_am_arg" 
>`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -643,7 +646,7 @@ if test x"${install_sh}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -664,7 +667,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -714,7 +717,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -753,7 +756,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -782,7 +785,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -829,7 +832,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -848,7 +851,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -929,7 +932,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -989,7 +992,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1017,7 +1020,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1036,7 +1039,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/configfrag.ac b/configfrag.ac
index 5df6239..e41a3a1 100644
--- a/configfrag.ac
+++ b/configfrag.ac
@@ -101,7 +101,7 @@ AC_DEFINE([SIMPLE_CLOCK], [0], [SIMPLE_CLOCK])
 AC_DEFINE([STAT_TIME], [1], [STAT_TIME])
 
 # Kernel tracing.
-AC_DEFINE([XPR_DEBUG], [1], [XPR_DEBUG])
+AC_DEFINE([XPR_DEBUG], [0], [XPR_DEBUG])
 
 # Slab allocator debugging facilities.
 AC_DEFINE([SLAB_VERIFY], [0], [SLAB_VERIFY])
diff --git a/configure b/configure
index 1e41680..8da0203 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU Mach 1.4+git20150711.
+# Generated by GNU Autoconf 2.69 for GNU Mach 1.5+git20150728.
 #
 # Report bugs to <address@hidden>.
 #
@@ -579,8 +579,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU Mach'
 PACKAGE_TARNAME='gnumach'
-PACKAGE_VERSION='1.4+git20150711'
-PACKAGE_STRING='GNU Mach 1.4+git20150711'
+PACKAGE_VERSION='1.5+git20150728'
+PACKAGE_STRING='GNU Mach 1.5+git20150728'
 PACKAGE_BUGREPORT='address@hidden'
 PACKAGE_URL=''
 
@@ -1584,7 +1584,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GNU Mach 1.4+git20150711 to adapt to many kinds of 
systems.
+\`configure' configures GNU Mach 1.5+git20150728 to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1654,7 +1654,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU Mach 1.4+git20150711:";;
+     short | recursive ) echo "Configuration of GNU Mach 1.5+git20150728:";;
    esac
   cat <<\_ACEOF
 
@@ -2002,7 +2002,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU Mach configure 1.4+git20150711
+GNU Mach configure 1.5+git20150728
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2094,7 +2094,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU Mach $as_me 1.4+git20150711, which was
+It was created by GNU Mach $as_me 1.5+git20150728, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2474,7 +2474,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please 
don't use this var.
 
 
 
-am__api_version='1.14'
+am__api_version='1.15'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2666,7 +2666,7 @@ else
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2960,7 +2960,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gnumach'
- VERSION='1.4+git20150711'
+ VERSION='1.5+git20150728'
 
 
 # Some tools Automake needs.
@@ -2985,8 +2985,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -6476,7 +6476,7 @@ $as_echo "#define STAT_TIME 1" >>confdefs.h
 
 # Kernel tracing.
 
-$as_echo "#define XPR_DEBUG 1" >>confdefs.h
+$as_echo "#define XPR_DEBUG 0" >>confdefs.h
 
 
 # Slab allocator debugging facilities.
@@ -12116,7 +12116,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GNU Mach $as_me 1.4+git20150711, which was
+This file was extended by GNU Mach $as_me 1.5+git20150728, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12187,7 +12187,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-GNU Mach config.status 1.4+git20150711
+GNU Mach config.status 1.5+git20150728
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/doc/mach.info b/doc/mach.info
index 042fdee..c50a3ba 100644
--- a/doc/mach.info
+++ b/doc/mach.info
@@ -1,9 +1,9 @@
-This is mach.info, produced by makeinfo version 5.2 from mach.texi.
+This is mach.info, produced by makeinfo version 6.0 from mach.texi.
 
 This file documents the GNU Mach microkernel.
 
    This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150711.
+Reference Manual', for version 1.5+git20150728.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
diff --git a/doc/mach.info-1 b/doc/mach.info-1
index 18ec847..1e77c43 100644
--- a/doc/mach.info-1
+++ b/doc/mach.info-1
@@ -1,9 +1,9 @@
-This is mach.info, produced by makeinfo version 5.2 from mach.texi.
+This is mach.info, produced by makeinfo version 6.0 from mach.texi.
 
 This file documents the GNU Mach microkernel.
 
    This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150711.
+Reference Manual', for version 1.5+git20150728.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
@@ -46,7 +46,7 @@ Main Menu
 This file documents the GNU Mach microkernel.
 
    This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150711.
+Reference Manual', for version 1.5+git20150728.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
@@ -1475,10 +1475,10 @@ File: mach.info,  Node: Exchanging Port Rights,  Next: 
Memory,  Prev: Message Fo
 ----------------------------
 
 Each task has its own space of port rights.  Port rights are named with
-positive integers.  Except for the reserved values 'MACH_PORT_NULL (0)'(1)
-and 'MACH_PORT_DEAD (~0)', this is a full 32-bit name space.  When the
-kernel chooses a name for a new right, it is free to pick any unused
-name (one which denotes no right) in the space.
+positive integers.  Except for the reserved values
+'MACH_PORT_NULL (0)'(1) and 'MACH_PORT_DEAD (~0)', this is a full 32-bit
+name space.  When the kernel chooses a name for a new right, it is free
+to pick any unused name (one which denotes no right) in the space.
 
    There are five basic kinds of rights: receive rights, send rights,
 send-once rights, port-set rights, and dead names.  Dead names are not
diff --git a/doc/mach.info-2 b/doc/mach.info-2
index 73e96dc..d602f4c 100644
--- a/doc/mach.info-2
+++ b/doc/mach.info-2
@@ -1,9 +1,9 @@
-This is mach.info, produced by makeinfo version 5.2 from mach.texi.
+This is mach.info, produced by makeinfo version 6.0 from mach.texi.
 
 This file documents the GNU Mach microkernel.
 
    This is edition 0.4, last updated on 9 July 2015, of 'The GNU Mach
-Reference Manual', for version 1.4+git20150711.
+Reference Manual', for version 1.5+git20150728.
 
    Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation,
 Inc.
@@ -1652,25 +1652,25 @@ Function and Data Index
 * device_open:                           Device Open.         (line   6)
 * device_open_request:                   Device Open.         (line  33)
 * device_read:                           Device Read.         (line   6)
-* device_read_inband:                    Device Read.         (line  24)
-* device_read_request:                   Device Read.         (line  31)
-* device_read_request_inband:            Device Read.         (line  48)
+* device_read_inband:                    Device Read.         (line  25)
+* device_read_request:                   Device Read.         (line  32)
+* device_read_request_inband:            Device Read.         (line  50)
 * device_reply_server:                   Device Reply Server. (line  10)
 * device_set_filter:                     Device Filter.       (line   6)
 * device_set_status:                     Device Status.       (line   6)
 * device_t:                              Device Interface.    (line  13)
 * device_write:                          Device Write.        (line   6)
-* device_write_inband:                   Device Write.        (line  21)
-* device_write_request:                  Device Write.        (line  28)
-* device_write_request_inband:           Device Write.        (line  45)
-* ds_device_open_reply:                  Device Open.         (line  36)
-* ds_device_read_reply:                  Device Read.         (line  34)
-* ds_device_read_reply_inband:           Device Read.         (line  52)
-* ds_device_write_reply:                 Device Write.        (line  31)
-* ds_device_write_reply_inband:          Device Write.        (line  49)
-* evc_wait:                              Exceptions.          (line  17)
-* exception_raise:                       Exceptions.          (line  11)
-* host_adjust_time:                      Host Time.           (line  40)
+* device_write_inband:                   Device Write.        (line  22)
+* device_write_request:                  Device Write.        (line  29)
+* device_write_request_inband:           Device Write.        (line  48)
+* ds_device_open_reply:                  Device Open.         (line  37)
+* ds_device_read_reply:                  Device Read.         (line  36)
+* ds_device_read_reply_inband:           Device Read.         (line  55)
+* ds_device_write_reply:                 Device Write.        (line  32)
+* ds_device_write_reply_inband:          Device Write.        (line  53)
+* evc_wait:                              Exceptions.          (line  18)
+* exception_raise:                       Exceptions.          (line  12)
+* host_adjust_time:                      Host Time.           (line  41)
 * host_basic_info_t:                     Host Information.    (line  74)
 * host_get_boot_info:                    Host Information.    (line 112)
 * host_get_time:                         Host Time.           (line  31)
@@ -1684,45 +1684,45 @@ Function and Data Index
                                                               (line  21)
 * host_reboot:                           Host Reboot.         (line   6)
 * host_sched_info_t:                     Host Information.    (line  91)
-* host_set_time:                         Host Time.           (line  36)
+* host_set_time:                         Host Time.           (line  37)
 * host_t:                                Host Ports.          (line   6)
 * ipc_space_t:                           Port Manipulation Interface.
                                                               (line   9)
 * mach_host_self:                        Host Ports.          (line  13)
 * mach_msg:                              Mach Message Call.   (line   9)
 * MACH_MSGH_BITS:                        Message Format.      (line 103)
-* MACH_MSGH_BITS_LOCAL:                  Message Format.      (line 115)
-* MACH_MSGH_BITS_OTHER:                  Message Format.      (line 125)
-* MACH_MSGH_BITS_PORTS:                  Message Format.      (line 120)
+* MACH_MSGH_BITS_LOCAL:                  Message Format.      (line 116)
+* MACH_MSGH_BITS_OTHER:                  Message Format.      (line 127)
+* MACH_MSGH_BITS_PORTS:                  Message Format.      (line 122)
 * MACH_MSGH_BITS_REMOTE:                 Message Format.      (line 110)
 * mach_msg_bits_t:                       Message Format.      (line  20)
 * mach_msg_header_t:                     Message Format.      (line  32)
 * mach_msg_id_t:                         Message Format.      (line  28)
 * mach_msg_size_t:                       Message Format.      (line  24)
 * mach_msg_timeout_t:                    Mach Message Call.   (line  60)
-* mach_msg_type_long_t:                  Message Format.      (line 246)
-* mach_msg_type_name_t:                  Message Format.      (line 136)
-* mach_msg_type_number_t:                Message Format.      (line 146)
-* MACH_MSG_TYPE_PORT_ANY:                Message Format.      (line 232)
-* MACH_MSG_TYPE_PORT_ANY_RIGHT:          Message Format.      (line 241)
-* MACH_MSG_TYPE_PORT_ANY_SEND:           Message Format.      (line 236)
-* mach_msg_type_size_t:                  Message Format.      (line 141)
-* mach_msg_type_t:                       Message Format.      (line 151)
+* mach_msg_type_long_t:                  Message Format.      (line 248)
+* mach_msg_type_name_t:                  Message Format.      (line 138)
+* mach_msg_type_number_t:                Message Format.      (line 148)
+* MACH_MSG_TYPE_PORT_ANY:                Message Format.      (line 234)
+* MACH_MSG_TYPE_PORT_ANY_RIGHT:          Message Format.      (line 243)
+* MACH_MSG_TYPE_PORT_ANY_SEND:           Message Format.      (line 238)
+* mach_msg_type_size_t:                  Message Format.      (line 143)
+* mach_msg_type_t:                       Message Format.      (line 153)
 * mach_ports_lookup:                     Inherited Ports.     (line  14)
 * mach_ports_register:                   Inherited Ports.     (line  12)
 * mach_port_allocate:                    Port Creation.       (line   6)
 * mach_port_allocate_name:               Port Creation.       (line  64)
-* mach_port_clear_protected_payload:     Receive Rights.      (line 142)
+* mach_port_clear_protected_payload:     Receive Rights.      (line 144)
 * mach_port_deallocate:                  Port Destruction.    (line   6)
 * mach_port_destroy:                     Port Destruction.    (line  28)
 * mach_port_extract_right:               Ports and other Tasks.
-                                                              (line  57)
+                                                              (line  58)
 * mach_port_get_receive_status:          Receive Rights.      (line  54)
 * mach_port_get_refs:                    Port Rights.         (line   6)
 * mach_port_get_set_status:              Port Sets.           (line   6)
 * mach_port_insert_right:                Ports and other Tasks.
                                                               (line   6)
-* mach_port_mod_refs:                    Port Rights.         (line  35)
+* mach_port_mod_refs:                    Port Rights.         (line  36)
 * mach_port_move_member:                 Port Sets.           (line  26)
 * mach_port_mscount_t:                   Receive Rights.      (line  10)
 * mach_port_msgcount_t:                  Receive Rights.      (line  14)
@@ -1732,76 +1732,76 @@ Function and Data Index
                                                               (line   6)
 * mach_port_rights_t:                    Receive Rights.      (line  18)
 * mach_port_seqno_t:                     Receive Rights.      (line   6)
-* mach_port_set_mscount:                 Receive Rights.      (line  71)
-* mach_port_set_protected_payload:       Receive Rights.      (line 124)
-* mach_port_set_qlimit:                  Receive Rights.      (line  88)
-* mach_port_set_seqno:                   Receive Rights.      (line 106)
+* mach_port_set_mscount:                 Receive Rights.      (line  73)
+* mach_port_set_protected_payload:       Receive Rights.      (line 126)
+* mach_port_set_qlimit:                  Receive Rights.      (line  90)
+* mach_port_set_seqno:                   Receive Rights.      (line 108)
 * mach_port_status_t:                    Receive Rights.      (line  22)
 * mach_port_t:                           Message Format.      (line  13)
 * mach_port_type:                        Port Names.          (line  33)
 * mach_reply_port:                       Port Creation.       (line  47)
 * mach_task_self:                        Task Information.    (line   6)
 * mach_thread_self:                      Thread Information.  (line   6)
-* mapped_time_value_t:                   Host Time.           (line  49)
+* mapped_time_value_t:                   Host Time.           (line  50)
 * memory_object_change_attributes:       Memory Object Attributes.
-                                                              (line  25)
+                                                              (line  26)
 * memory_object_change_completed:        Memory Object Attributes.
-                                                              (line  60)
+                                                              (line  64)
 * memory_object_copy:                    Memory Objects and Data.
-                                                              (line 202)
+                                                              (line 209)
 * memory_object_create:                  Default Memory Manager.
                                                               (line  25)
 * memory_object_data_error:              Memory Objects and Data.
-                                                              (line 152)
+                                                              (line 159)
 * memory_object_data_initialize:         Default Memory Manager.
-                                                              (line  69)
+                                                              (line  73)
 * memory_object_data_provided:           Memory Objects and Data.
-                                                              (line 284)
+                                                              (line 298)
 * memory_object_data_request:            Memory Objects and Data.
-                                                              (line  45)
+                                                              (line  47)
 * memory_object_data_return:             Memory Objects and Data.
                                                               (line   6)
 * memory_object_data_supply:             Memory Objects and Data.
-                                                              (line  80)
+                                                              (line  84)
 * memory_object_data_unavailable:        Memory Objects and Data.
-                                                              (line 172)
+                                                              (line 179)
 * memory_object_data_unlock:             Memory Object Locking.
-                                                              (line  81)
+                                                              (line  83)
 * memory_object_data_write:              Memory Objects and Data.
-                                                              (line 254)
+                                                              (line 266)
 * memory_object_default_server:          Memory Object Server.
                                                               (line   8)
 * memory_object_destroy:                 Memory Object Termination.
-                                                              (line  35)
+                                                              (line  39)
 * memory_object_get_attributes:          Memory Object Attributes.
                                                               (line   6)
 * memory_object_init:                    Memory Object Creation.
                                                               (line   6)
 * memory_object_lock_completed:          Memory Object Locking.
-                                                              (line  55)
+                                                              (line  56)
 * memory_object_lock_request:            Memory Object Locking.
                                                               (line   6)
 * memory_object_ready:                   Memory Object Creation.
-                                                              (line  48)
+                                                              (line  55)
 * memory_object_server:                  Memory Object Server.
                                                               (line   6)
 * memory_object_set_attributes:          Memory Object Attributes.
-                                                              (line  76)
+                                                              (line  81)
 * memory_object_supply_completed:        Memory Objects and Data.
-                                                              (line 121)
+                                                              (line 125)
 * memory_object_terminate:               Memory Object Termination.
                                                               (line   6)
 * processor_assign:                      Processors and Sets. (line   6)
-* processor_basic_info_t:                Processor Info.      (line  66)
+* processor_basic_info_t:                Processor Info.      (line  67)
 * processor_control:                     Processor Control.   (line   8)
 * processor_exit:                        Processor Control.   (line   7)
 * processor_get_assignment:              Processors and Sets. (line  30)
 * processor_info:                        Processor Info.      (line   6)
-* processor_set_basic_info_t:            Processor Set Info.  (line  74)
+* processor_set_basic_info_t:            Processor Set Info.  (line  75)
 * processor_set_create:                  Processor Set Creation.
                                                               (line   6)
 * processor_set_default:                 Processor Set Access.
-                                                              (line  33)
+                                                              (line  34)
 * processor_set_destroy:                 Processor Set Destruction.
                                                               (line   6)
 * processor_set_info:                    Processor Set Info.  (line   6)
@@ -1812,122 +1812,122 @@ Function and Data Index
                                                               (line   8)
 * processor_set_policy_enable:           Processor Set Policy.
                                                               (line   6)
-* processor_set_sched_info_t:            Processor Set Info.  (line  92)
+* processor_set_sched_info_t:            Processor Set Info.  (line  93)
 * processor_set_t:                       Processor Set Ports. (line  12)
 * processor_set_tasks:                   Tasks and Threads on Sets.
                                                               (line   6)
 * processor_set_threads:                 Tasks and Threads on Sets.
-                                                              (line  20)
+                                                              (line  21)
 * processor_start:                       Processor Control.   (line   6)
 * processor_t:                           Processor Interface. (line   6)
-* sampled_pc_flavor_t:                   Profiling.           (line  67)
-* sampled_pc_t:                          Profiling.           (line  52)
+* sampled_pc_flavor_t:                   Profiling.           (line  69)
+* sampled_pc_t:                          Profiling.           (line  54)
 * seqnos_memory_object_change_completed: Memory Object Attributes.
-                                                              (line  63)
+                                                              (line  67)
 * seqnos_memory_object_copy:             Memory Objects and Data.
-                                                              (line 207)
+                                                              (line 217)
 * seqnos_memory_object_create:           Default Memory Manager.
-                                                              (line  30)
+                                                              (line  33)
 * seqnos_memory_object_data_initialize:  Default Memory Manager.
-                                                              (line  73)
+                                                              (line  78)
 * seqnos_memory_object_data_request:     Memory Objects and Data.
-                                                              (line  49)
+                                                              (line  53)
 * seqnos_memory_object_data_return:      Memory Objects and Data.
-                                                              (line  11)
+                                                              (line  13)
 * seqnos_memory_object_data_unlock:      Memory Object Locking.
-                                                              (line  85)
+                                                              (line  89)
 * seqnos_memory_object_data_write:       Memory Objects and Data.
-                                                              (line 258)
+                                                              (line 272)
 * seqnos_memory_object_default_server:   Memory Object Server.
-                                                              (line  12)
+                                                              (line  14)
 * seqnos_memory_object_init:             Memory Object Creation.
-                                                              (line  11)
+                                                              (line  15)
 * seqnos_memory_object_lock_completed:   Memory Object Locking.
-                                                              (line  59)
+                                                              (line  61)
 * seqnos_memory_object_server:           Memory Object Server.
-                                                              (line  10)
+                                                              (line  11)
 * seqnos_memory_object_supply_completed: Memory Objects and Data.
-                                                              (line 126)
+                                                              (line 132)
 * seqnos_memory_object_terminate:        Memory Object Termination.
-                                                              (line  10)
+                                                              (line  13)
 * struct host_basic_info:                Host Information.    (line  47)
 * struct host_sched_info:                Host Information.    (line  77)
-* struct processor_basic_info:           Processor Info.      (line  43)
-* struct processor_set_basic_info:       Processor Set Info.  (line  50)
-* struct processor_set_sched_info:       Processor Set Info.  (line  77)
-* struct task_basic_info:                Task Information.    (line  81)
-* struct task_events_info:               Task Information.    (line 112)
-* struct task_thread_times_info:         Task Information.    (line 143)
-* struct thread_basic_info:              Thread Information.  (line  65)
-* struct thread_sched_info:              Thread Information.  (line 126)
-* swtch:                                 Hand-Off Scheduling. (line  81)
-* swtch_pri:                             Hand-Off Scheduling. (line  93)
+* struct processor_basic_info:           Processor Info.      (line  44)
+* struct processor_set_basic_info:       Processor Set Info.  (line  51)
+* struct processor_set_sched_info:       Processor Set Info.  (line  78)
+* struct task_basic_info:                Task Information.    (line  82)
+* struct task_events_info:               Task Information.    (line 113)
+* struct task_thread_times_info:         Task Information.    (line 144)
+* struct thread_basic_info:              Thread Information.  (line  66)
+* struct thread_sched_info:              Thread Information.  (line 127)
+* swtch:                                 Hand-Off Scheduling. (line  82)
+* swtch_pri:                             Hand-Off Scheduling. (line  94)
 * task_assign:                           Tasks and Threads on Sets.
-                                                              (line  34)
+                                                              (line  36)
 * task_assign_default:                   Tasks and Threads on Sets.
-                                                              (line  47)
-* task_basic_info_t:                     Task Information.    (line 109)
+                                                              (line  50)
+* task_basic_info_t:                     Task Information.    (line 110)
 * task_create:                           Task Creation.       (line   6)
-* task_disable_pc_sampling:              Profiling.           (line  20)
+* task_disable_pc_sampling:              Profiling.           (line  21)
 * task_enable_pc_sampling:               Profiling.           (line   6)
-* task_events_info_t:                    Task Information.    (line 140)
+* task_events_info_t:                    Task Information.    (line 141)
 * task_get_assignment:                   Tasks and Threads on Sets.
-                                                              (line  57)
-* task_get_bootstrap_port:               Task Special Ports.  (line  40)
+                                                              (line  61)
+* task_get_bootstrap_port:               Task Special Ports.  (line  41)
 * task_get_emulation_vector:             Syscall Emulation.   (line   6)
-* task_get_exception_port:               Task Special Ports.  (line  34)
-* task_get_kernel_port:                  Task Special Ports.  (line  28)
-* task_get_sampled_pcs:                  Profiling.           (line  34)
+* task_get_exception_port:               Task Special Ports.  (line  35)
+* task_get_kernel_port:                  Task Special Ports.  (line  29)
+* task_get_sampled_pcs:                  Profiling.           (line  36)
 * task_get_special_port:                 Task Special Ports.  (line   6)
-* task_info:                             Task Information.    (line  41)
+* task_info:                             Task Information.    (line  42)
 * task_priority:                         Task Execution.      (line  27)
 * task_ras_control:                      Task Execution.      (line  45)
 * task_resume:                           Task Execution.      (line  18)
-* task_set_bootstrap_port:               Task Special Ports.  (line  76)
-* task_set_emulation:                    Syscall Emulation.   (line  20)
+* task_set_bootstrap_port:               Task Special Ports.  (line  78)
+* task_set_emulation:                    Syscall Emulation.   (line  21)
 * task_set_emulation_vector:             Syscall Emulation.   (line  12)
-* task_set_exception_port:               Task Special Ports.  (line  70)
-* task_set_kernel_port:                  Task Special Ports.  (line  64)
-* task_set_name:                         Task Information.    (line 160)
-* task_set_special_port:                 Task Special Ports.  (line  46)
+* task_set_exception_port:               Task Special Ports.  (line  72)
+* task_set_kernel_port:                  Task Special Ports.  (line  66)
+* task_set_name:                         Task Information.    (line 161)
+* task_set_special_port:                 Task Special Ports.  (line  47)
 * task_suspend:                          Task Execution.      (line   6)
 * task_t:                                Task Interface.      (line   6)
 * task_terminate:                        Task Termination.    (line   6)
 * task_threads:                          Task Information.    (line  30)
-* task_thread_times_info_t:              Task Information.    (line 157)
+* task_thread_times_info_t:              Task Information.    (line 158)
 * thread_abort:                          Thread Execution.    (line  36)
 * thread_assign:                         Tasks and Threads on Sets.
-                                                              (line  69)
+                                                              (line  73)
 * thread_assign_default:                 Tasks and Threads on Sets.
-                                                              (line  83)
-* thread_basic_info_t:                   Thread Information.  (line 123)
+                                                              (line  87)
+* thread_basic_info_t:                   Thread Information.  (line 124)
 * thread_create:                         Thread Creation.     (line   6)
-* thread_depress_abort:                  Hand-Off Scheduling. (line  74)
-* thread_disable_pc_sampling:            Profiling.           (line  22)
-* thread_enable_pc_sampling:             Profiling.           (line   8)
+* thread_depress_abort:                  Hand-Off Scheduling. (line  75)
+* thread_disable_pc_sampling:            Profiling.           (line  24)
+* thread_enable_pc_sampling:             Profiling.           (line   9)
 * thread_get_assignment:                 Tasks and Threads on Sets.
-                                                              (line  93)
+                                                              (line  97)
 * thread_get_exception_port:             Thread Special Ports.
                                                               (line  25)
 * thread_get_kernel_port:                Thread Special Ports.
                                                               (line  19)
-* thread_get_sampled_pcs:                Profiling.           (line  37)
+* thread_get_sampled_pcs:                Profiling.           (line  39)
 * thread_get_special_port:               Thread Special Ports.
                                                               (line   6)
 * thread_get_state:                      Thread Execution.    (line  98)
 * thread_info:                           Thread Information.  (line  30)
-* thread_max_priority:                   Thread Priority.     (line  36)
+* thread_max_priority:                   Thread Priority.     (line  37)
 * thread_policy:                         Scheduling Policy.   (line   6)
 * thread_priority:                       Thread Priority.     (line  18)
 * thread_resume:                         Thread Execution.    (line  27)
-* thread_sched_info_t:                   Thread Information.  (line 157)
+* thread_sched_info_t:                   Thread Information.  (line 158)
 * thread_set_exception_port:             Thread Special Ports.
                                                               (line  50)
 * thread_set_kernel_port:                Thread Special Ports.
                                                               (line  44)
 * thread_set_special_port:               Thread Special Ports.
                                                               (line  31)
-* thread_set_state:                      Thread Execution.    (line 122)
+* thread_set_state:                      Thread Execution.    (line 123)
 * thread_suspend:                        Thread Execution.    (line   6)
 * thread_switch:                         Hand-Off Scheduling. (line   6)
 * thread_t:                              Thread Interface.    (line   6)
@@ -1940,7 +1940,7 @@ Function and Data Index
 * vm_copy:                               Data Transfer.       (line  50)
 * vm_deallocate:                         Memory Deallocation. (line   6)
 * vm_inherit:                            Memory Attributes.   (line  68)
-* vm_machine_attribute:                  Memory Attributes.   (line 131)
+* vm_machine_attribute:                  Memory Attributes.   (line 132)
 * vm_map:                                Mapping Memory Objects.
                                                               (line   6)
 * vm_protect:                            Memory Attributes.   (line  34)
@@ -1952,6 +1952,6 @@ Function and Data Index
 * vm_statistics_data_t:                  Memory Statistics.   (line   6)
 * vm_task_t:                             Virtual Memory Interface.
                                                               (line   6)
-* vm_wire:                               Memory Attributes.   (line  98)
+* vm_wire:                               Memory Attributes.   (line  99)
 * vm_write:                              Data Transfer.       (line  31)
 
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 1e9cbcd..6aaef12 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
 @set UPDATED 9 July 2015
 @set UPDATED-MONTH July 2015
address@hidden EDITION 1.4+git20150711
address@hidden VERSION 1.4+git20150711
address@hidden EDITION 1.5+git20150728
address@hidden VERSION 1.5+git20150728
diff --git a/doc/version.texi b/doc/version.texi
index 1e9cbcd..6aaef12 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
 @set UPDATED 9 July 2015
 @set UPDATED-MONTH July 2015
address@hidden EDITION 1.4+git20150711
address@hidden VERSION 1.4+git20150711
address@hidden EDITION 1.5+git20150728
address@hidden VERSION 1.5+git20150728
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 62b33cf..dc9f360 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -166,7 +166,7 @@ vm_offset_t kernel_virtual_end;
 #define unlock_pvh_pai(pai)    (bit_unlock(pai, pv_lock_table))
 
 /*
- *     Array of physical page attribites for managed pages.
+ *     Array of physical page attributes for managed pages.
  *     One byte per physical page.
  */
 char   *pmap_phys_attributes;
diff --git a/include/mach/time_value.h b/include/mach/time_value.h
index 2a2f091..61be581 100644
--- a/include/mach/time_value.h
+++ b/include/mach/time_value.h
@@ -45,23 +45,40 @@ typedef     struct time_value       time_value_t;
  */
 #define        TIME_MICROS_MAX (1000000)
 
+#define time_value_assert(val)                 \
+  assert(0 <= (val)->microseconds && (val)->microseconds < TIME_MICROS_MAX);
+
 #define        time_value_add_usec(val, micros)        {       \
+       time_value_assert(val);                         \
        if (((val)->microseconds += (micros))           \
                >= TIME_MICROS_MAX) {                   \
            (val)->microseconds -= TIME_MICROS_MAX;     \
            (val)->seconds++;                           \
        }                                               \
+       time_value_assert(val);                         \
 }
 
-#define        time_value_add(result, addend)          {               \
-       (result)->microseconds += (addend)->microseconds;       \
-       (result)->seconds += (addend)->seconds;                 \
-       if ((result)->microseconds >= TIME_MICROS_MAX) {        \
-           (result)->microseconds -= TIME_MICROS_MAX;          \
-           (result)->seconds++;                                \
-       }                                                       \
+#define        time_value_sub_usec(val, micros)        {       \
+       time_value_assert(val);                         \
+       if (((val)->microseconds -= (micros)) < 0) {    \
+           (val)->microseconds += TIME_MICROS_MAX;     \
+           (val)->seconds--;                           \
+       }                                               \
+       time_value_assert(val);                         \
 }
 
+#define        time_value_add(result, addend) {                        \
+    time_value_assert(addend);                                 \
+    (result)->seconds += (addend)->seconds;                    \
+    time_value_add_usec(result, (addend)->microseconds);       \
+  }
+
+#define        time_value_sub(result, subtrahend) {                    \
+    time_value_assert(subtrahend);                             \
+    (result)->seconds -= (subtrahend)->seconds;                        \
+    time_value_sub_usec(result, (subtrahend)->microseconds);   \
+  }
+
 /*
  *     Time value available through the mapped-time interface.
  *     Read this mapped value with
diff --git a/ipc/ipc_entry.c b/ipc/ipc_entry.c
index a5fe319..0414ba5 100644
--- a/ipc/ipc_entry.c
+++ b/ipc/ipc_entry.c
@@ -56,8 +56,7 @@ struct kmem_cache ipc_entry_cache;
  *     Purpose:
  *             Allocate an entry out of the space.
  *     Conditions:
- *             The space is not locked before, but it is write-locked after
- *             if the call is successful.  May allocate memory.
+ *             The space must be write-locked.  May allocate memory.
  *     Returns:
  *             KERN_SUCCESS            An entry was allocated.
  *             KERN_INVALID_TASK       The space is dead.
@@ -75,27 +74,21 @@ ipc_entry_alloc(
        ipc_entry_t entry;
        rdxtree_key_t key;
 
-       is_write_lock(space);
-
        if (!space->is_active) {
-               is_write_unlock(space);
                return KERN_INVALID_TASK;
        }
 
        kr = ipc_entry_get(space, namep, entryp);
        if (kr == KERN_SUCCESS)
-               /* Success.  Space is write-locked.  */
                return kr;
 
        entry = ie_alloc();
        if (entry == IE_NULL) {
-               is_write_unlock(space);
                return KERN_RESOURCE_SHORTAGE;
        }
 
        kr = rdxtree_insert_alloc(&space->is_map, entry, &key);
        if (kr) {
-               is_write_unlock(space);
                ie_free(entry);
                return kr;
        }
@@ -108,7 +101,6 @@ ipc_entry_alloc(
 
        *entryp = entry;
        *namep = (mach_port_t) key;
-       /* Success.  Space is write-locked.  */
        return KERN_SUCCESS;
 }
 
@@ -118,8 +110,7 @@ ipc_entry_alloc(
  *             Allocates/finds an entry with a specific name.
  *             If an existing entry is returned, its type will be nonzero.
  *     Conditions:
- *             The space is not locked before, but it is write-locked after
- *             if the call is successful.  May allocate memory.
+ *             The space must be write-locked.  May allocate memory.
  *     Returns:
  *             KERN_SUCCESS            Found existing entry with same name.
  *             KERN_SUCCESS            Allocated a new entry.
@@ -138,10 +129,7 @@ ipc_entry_alloc_name(
        void **slot;
        assert(MACH_PORT_VALID(name));
 
-       is_write_lock(space);
-
        if (!space->is_active) {
-               is_write_unlock(space);
                return KERN_INVALID_TASK;
        }
 
@@ -152,7 +140,6 @@ ipc_entry_alloc_name(
        if (slot == NULL || entry == IE_NULL) {
                entry = ie_alloc();
                if (entry == IE_NULL) {
-                       is_write_unlock(space);
                        return KERN_RESOURCE_SHORTAGE;
                }
 
@@ -167,7 +154,6 @@ ipc_entry_alloc_name(
                        kr = rdxtree_insert(&space->is_map,
                                            (rdxtree_key_t) name, entry);
                        if (kr != KERN_SUCCESS) {
-                               is_write_unlock(space);
                                ie_free(entry);
                                return kr;
                        }
@@ -175,14 +161,12 @@ ipc_entry_alloc_name(
                space->is_size += 1;
 
                *entryp = entry;
-               /* Success.  Space is write-locked.  */
                return KERN_SUCCESS;
        }
 
        if (IE_BITS_TYPE(entry->ie_bits)) {
                /* Used entry.  */
                *entryp = entry;
-               /* Success.  Space is write-locked.  */
                return KERN_SUCCESS;
        }
 
@@ -202,7 +186,6 @@ ipc_entry_alloc_name(
 
        space->is_size += 1;
        *entryp = entry;
-       /* Success.  Space is write-locked.  */
        return KERN_SUCCESS;
 }
 
diff --git a/ipc/ipc_object.c b/ipc/ipc_object.c
index 2d84cf5..320fbcb 100644
--- a/ipc/ipc_object.c
+++ b/ipc/ipc_object.c
@@ -155,11 +155,12 @@ ipc_object_alloc_dead(
        ipc_entry_t entry;
        kern_return_t kr;
 
-
+       is_write_lock(space);
        kr = ipc_entry_alloc(space, namep, &entry);
-       if (kr != KERN_SUCCESS)
+       if (kr != KERN_SUCCESS) {
+               is_write_unlock(space);
                return kr;
-       /* space is write-locked */
+       }
 
        /* null object, MACH_PORT_TYPE_DEAD_NAME, 1 uref */
 
@@ -191,11 +192,12 @@ ipc_object_alloc_dead_name(
        ipc_entry_t entry;
        kern_return_t kr;
 
-
+       is_write_lock(space);
        kr = ipc_entry_alloc_name(space, name, &entry);
-       if (kr != KERN_SUCCESS)
+       if (kr != KERN_SUCCESS) {
+               is_write_unlock(space);
                return kr;
-       /* space is write-locked */
+       }
 
        if (ipc_right_inuse(space, name, entry))
                return KERN_NAME_EXISTS;
@@ -254,12 +256,13 @@ ipc_object_alloc(
 
                memset(pset, 0, sizeof(*pset));
        }
+       is_write_lock(space);
        kr = ipc_entry_alloc(space, namep, &entry);
        if (kr != KERN_SUCCESS) {
+               is_write_unlock(space);
                io_free(otype, object);
                return kr;
        }
-       /* space is write-locked */
 
        entry->ie_bits |= type | urefs;
        entry->ie_object = object;
@@ -321,12 +324,13 @@ ipc_object_alloc_name(
                memset(pset, 0, sizeof(*pset));
        }
 
+       is_write_lock(space);
        kr = ipc_entry_alloc_name(space, name, &entry);
        if (kr != KERN_SUCCESS) {
+               is_write_unlock(space);
                io_free(otype, object);
                return kr;
        }
-       /* space is write-locked */
 
        if (ipc_right_inuse(space, name, entry)) {
                io_free(otype, object);
@@ -753,10 +757,12 @@ ipc_object_copyout_name(
        assert(IO_VALID(object));
        assert(io_otype(object) == IOT_PORT);
 
+       is_write_lock(space);
        kr = ipc_entry_alloc_name(space, name, &entry);
-       if (kr != KERN_SUCCESS)
+       if (kr != KERN_SUCCESS) {
+               is_write_unlock(space);
                return kr;
-       /* space is write-locked and active */
+       }
 
        if ((msgt_name != MACH_MSG_TYPE_PORT_SEND_ONCE) &&
            ipc_right_reverse(space, object, &oname, &oentry)) {
@@ -930,10 +936,12 @@ ipc_object_rename(
        ipc_entry_t oentry, nentry;
        kern_return_t kr;
 
+       is_write_lock(space);
        kr = ipc_entry_alloc_name(space, nname, &nentry);
-       if (kr != KERN_SUCCESS)
+       if (kr != KERN_SUCCESS) {
+               is_write_unlock(space);
                return kr;
-       /* space is write-locked and active */
+       }
 
        if (ipc_right_inuse(space, nname, nentry)) {
                /* space is unlocked */
diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
index bbfee46..a2aac40 100644
--- a/ipc/ipc_space.h
+++ b/ipc/ipc_space.h
@@ -62,7 +62,7 @@ struct ipc_space {
        decl_simple_lock_data(,is_ref_lock_data)
        ipc_space_refs_t is_references;
 
-       decl_simple_lock_data(,is_lock_data)
+       struct lock is_lock_data;
        boolean_t is_active;            /* is the space alive? */
        struct rdxtree is_map;          /* a map of entries */
        size_t is_size;                 /* number of entries */
@@ -107,22 +107,22 @@ MACRO_BEGIN                                               
                \
                is_free(is);                                            \
 MACRO_END
 
-#define        is_lock_init(is)        simple_lock_init(&(is)->is_lock_data)
+#define        is_lock_init(is)        lock_init(&(is)->is_lock_data, TRUE)
 
-#define        is_read_lock(is)        simple_lock(&(is)->is_lock_data)
-#define is_read_unlock(is)     simple_unlock(&(is)->is_lock_data)
+#define        is_read_lock(is)        lock_read(&(is)->is_lock_data)
+#define is_read_unlock(is)     lock_done(&(is)->is_lock_data)
 
-#define        is_write_lock(is)       simple_lock(&(is)->is_lock_data)
-#define        is_write_lock_try(is)   simple_lock_try(&(is)->is_lock_data)
-#define is_write_unlock(is)    simple_unlock(&(is)->is_lock_data)
+#define        is_write_lock(is)       lock_write(&(is)->is_lock_data)
+#define        is_write_lock_try(is)   lock_try_write(&(is)->is_lock_data)
+#define is_write_unlock(is)    lock_done(&(is)->is_lock_data)
 
-#define        is_write_to_read_lock(is)
+#define        is_write_to_read_lock(is) 
lock_write_to_read(&(is)->is_lock_data)
 
 extern void ipc_space_reference(struct ipc_space *space);
 extern void ipc_space_release(struct ipc_space *space);
 
-#define        is_reference(is)        ipc_space_reference(is)
-#define        is_release(is)          ipc_space_release(is)
+#define        is_reference(is)        ipc_space_reference_macro(is)
+#define        is_release(is)          ipc_space_release_macro(is)
 
 kern_return_t  ipc_space_create(ipc_space_t *);
 kern_return_t  ipc_space_create_special(struct ipc_space **);
diff --git a/ipc/ipc_table.c b/ipc/ipc_table.c
index 1a89d81..0f8592a 100644
--- a/ipc/ipc_table.c
+++ b/ipc/ipc_table.c
@@ -114,15 +114,7 @@ vm_offset_t
 ipc_table_alloc(
        vm_size_t       size)
 {
-       vm_offset_t table;
-
-       if (size < PAGE_SIZE)
-               table = kalloc(size);
-       else
-               if (kmem_alloc(kmem_map, &table, size) != KERN_SUCCESS)
-                       table = 0;
-
-       return table;
+       return kalloc(size);
 }
 
 /*
@@ -139,8 +131,5 @@ ipc_table_free(
        vm_size_t       size,
        vm_offset_t     table)
 {
-       if (size < PAGE_SIZE)
-               kfree(table, size);
-       else
-               kmem_free(kmem_map, table, size);
+       kfree(table, size);
 }
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index e70e1f6..cb0f976 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -735,6 +735,8 @@ boot_script_exec_cmd (void *hook, task_t task, char *path, 
int argc,
          thread_sleep ((event_t) &info, simple_lock_addr(info.lock), FALSE);
          simple_lock (&info.lock);
        }
+      simple_unlock (&info.lock);
+      thread_deallocate (thread);
       printf ("\n");
     }
 
@@ -769,6 +771,7 @@ static void user_bootstrap(void)
   simple_lock (&info->lock);
   assert (!info->done);
   info->done = 1;
+  simple_unlock (&info->lock);
   thread_wakeup ((event_t) info);
 
   /*
@@ -834,6 +837,7 @@ boot_script_free_task (task_t task, int aborting)
 {
   if (aborting)
     task_terminate (task);
+  task_deallocate (task);
 }
 
 int
diff --git a/kern/lock.c b/kern/lock.c
index fb5e344..3c74fec 100644
--- a/kern/lock.c
+++ b/kern/lock.c
@@ -133,7 +133,7 @@ unsigned int simple_locks_taken = 0;
 
 struct simple_locks_info {
        simple_lock_t l;
-       unsigned int ra;
+       void *ra;
 } simple_locks_info[NSLINFO];
 
 void check_simple_locks(void)
@@ -161,10 +161,8 @@ void simple_lock(
 
        info = &simple_locks_info[simple_locks_taken++];
        info->l = l;
-       /* XXX we want our return address, if possible */
-#if defined(__i386__)
-       info->ra = *((unsigned long *)&l - 1);
-#endif /* i386 */
+       info->ra =
+               __builtin_extract_return_addr (__builtin_return_address (0));
 }
 
 boolean_t simple_lock_try(
@@ -179,10 +177,8 @@ boolean_t simple_lock_try(
 
        info = &simple_locks_info[simple_locks_taken++];
        info->l = l;
-       /* XXX we want our return address, if possible */
-#if defined(__i386__)
-       info->ra = *((unsigned long *)&l - 1);
-#endif /* i386 */
+       info->ra =
+               __builtin_extract_return_addr (__builtin_return_address (0));
 
        return TRUE;
 }
diff --git a/kern/lock.h b/kern/lock.h
index a6d286a..435ee1d 100644
--- a/kern/lock.h
+++ b/kern/lock.h
@@ -49,8 +49,15 @@
 
 struct slock {
        volatile natural_t lock_data;   /* in general 1 bit is sufficient */
+       struct {} is_a_simple_lock;
 };
 
+/*
+ *     Used by macros to assert that the given argument is a simple
+ *     lock.
+ */
+#define simple_lock_assert(l)  (void) &(l)->is_a_simple_lock
+
 typedef struct slock   simple_lock_data_t;
 typedef struct slock   *simple_lock_t;
 
@@ -62,7 +69,8 @@ typedef struct slock  *simple_lock_t;
 #define        decl_simple_lock_data(class,name) \
 class  simple_lock_data_t      name;
 
-#define        simple_lock_addr(lock)  (&(lock))
+#define        simple_lock_addr(lock)  (simple_lock_assert(&(lock)),   \
+                                &(lock))
 
 #if    (NCPUS > 1)
 
@@ -70,7 +78,8 @@ class simple_lock_data_t      name;
  *     The single-CPU debugging routines are not valid
  *     on a multiprocessor.
  */
-#define        simple_lock_taken(lock)         (1)     /* always succeeds */
+#define        simple_lock_taken(lock)         (simple_lock_assert(lock),      
\
+                                        1)     /* always succeeds */
 #define check_simple_locks()
 
 #else  /* NCPUS > 1 */
@@ -84,7 +93,8 @@ extern void           simple_unlock(simple_lock_t);
 extern boolean_t       simple_lock_try(simple_lock_t);
 
 #define simple_lock_pause()
-#define simple_lock_taken(lock)                ((lock)->lock_data)
+#define simple_lock_taken(lock)                (simple_lock_assert(lock),      
\
+                                        (lock)->lock_data)
 
 extern void            check_simple_locks(void);
 
@@ -94,19 +104,22 @@ extern void                check_simple_locks(void);
 /*
  * Do not allocate storage for locks if not needed.
  */
-struct simple_lock_data_empty {};
-#define        decl_simple_lock_data(class,name) \
+struct simple_lock_data_empty { struct {} is_a_simple_lock; };
+#define        decl_simple_lock_data(class,name)       \
 class struct simple_lock_data_empty name;
-#define        simple_lock_addr(lock)          ((simple_lock_t)0)
+#define        simple_lock_addr(lock)          (simple_lock_assert(&(lock)),   
\
+                                        (simple_lock_t)0)
 
 /*
  *     No multiprocessor locking is necessary.
  */
-#define simple_lock_init(l)
-#define simple_lock(l)
-#define simple_unlock(l) ((void)(l))
-#define simple_lock_try(l)     (TRUE)  /* always succeeds */
-#define simple_lock_taken(l)   (1)     /* always succeeds */
+#define simple_lock_init(l)    simple_lock_assert(l)
+#define simple_lock(l)         simple_lock_assert(l)
+#define simple_unlock(l)       simple_lock_assert(l)
+#define simple_lock_try(l)     (simple_lock_assert(l),         \
+                                TRUE)  /* always succeeds */
+#define simple_lock_taken(l)   (simple_lock_assert(l),         \
+                                1)     /* always succeeds */
 #define check_simple_locks()
 #define simple_lock_pause()
 
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index b627b89..655adf4 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -367,9 +367,30 @@ void init_timeout(void)
 
        elapsed_ticks = 0;
 }
+
+/*
+ * We record timestamps using the boot-time clock.  We keep track of
+ * the boot-time clock by storing the difference to the real-time
+ * clock.
+ */
+struct time_value clock_boottime_offset;
+
+/*
+ * Update the offset of the boot-time clock from the real-time clock.
+ * This function must be called when the real-time clock is updated.
+ * This function must be called at SPLHIGH.
+ */
+void
+clock_boottime_update(struct time_value *new_time)
+{
+       struct time_value delta = time;
+       time_value_sub(&delta, new_time);
+       time_value_add(&clock_boottime_offset, &delta);
+}
 
 /*
- * Record a timestamp in STAMP. 
+ * Record a timestamp in STAMP.  Records values in the boot-time clock
+ * frame.
  */
 void
 record_time_stamp (time_value_t *stamp)
@@ -378,6 +399,18 @@ record_time_stamp (time_value_t *stamp)
                stamp->seconds = mtime->seconds;
                stamp->microseconds = mtime->microseconds;
        } while (stamp->seconds != mtime->check_seconds);
+       time_value_add(stamp, &clock_boottime_offset);
+}
+
+/*
+ * Read a timestamp in STAMP into RESULT.  Returns values in the
+ * real-time clock frame.
+ */
+void
+read_time_stamp (time_value_t *stamp, time_value_t *result)
+{
+       *result = *stamp;
+       time_value_sub(result, &clock_boottime_offset);
 }
 
 
@@ -423,6 +456,7 @@ host_set_time(host, new_time)
 #endif /* NCPUS > 1 */
 
        s = splhigh();
+       clock_boottime_update(&new_time);
        time = new_time;
        update_mapped_time(&time);
        resettodr();
diff --git a/kern/mach_clock.h b/kern/mach_clock.h
index 89fd335..1af0cda 100644
--- a/kern/mach_clock.h
+++ b/kern/mach_clock.h
@@ -86,9 +86,18 @@ extern boolean_t reset_timeout(timer_elt_t telt);
 
 extern void init_timeout (void);
 
-/* Read the current time into STAMP.  */
+/*
+ * Record a timestamp in STAMP.  Records values in the boot-time clock
+ * frame.
+ */
 extern void record_time_stamp (time_value_t *stamp);
 
+/*
+ * Read a timestamp in STAMP into RESULT.  Returns values in the
+ * real-time clock frame.
+ */
+extern void read_time_stamp (time_value_t *stamp, time_value_t *result);
+
 extern kern_return_t host_get_time(
    host_t host,
    time_value_t *current_time);
diff --git a/kern/printf.c b/kern/printf.c
index 13f2dc0..50f2362 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -151,21 +151,6 @@ void printnum(
 
 boolean_t      _doprnt_truncates = FALSE;
 
-/* printf could be called at _any_ point during system initialization,
-   including before printf_init() gets called from the "normal" place
-   in kern/startup.c.  */
-boolean_t      _doprnt_lock_initialized = FALSE;
-decl_simple_lock_data(,_doprnt_lock)
-
-void printf_init(void)
-{
-       if (!_doprnt_lock_initialized)
-       {
-               _doprnt_lock_initialized = TRUE;
-               simple_lock_init(&_doprnt_lock);
-       }
-}
-
 void _doprnt(
        const char      *fmt,
        va_list         argp,
@@ -187,22 +172,6 @@ void _doprnt(
        int             base;
        char            c;
 
-       printf_init();
-
-#if 0
-       /* Make sure that we get *some* printout, no matter what */
-       simple_lock(&_doprnt_lock);
-#else
-       {
-               int i = 0;
-               while (i < 1*1024*1024) {
-                       if (simple_lock_try(&_doprnt_lock))
-                               break;
-                       i++;
-               }
-       }
-#endif
-
        while ((c = *fmt) != '\0') {
            if (c != '%') {
                (*putc)(c, putc_arg);
@@ -522,8 +491,6 @@ void _doprnt(
            }
        fmt++;
        }
-
-       simple_unlock(&_doprnt_lock);
 }
 
 /*
diff --git a/kern/printf.h b/kern/printf.h
index 76047f0..b72640a 100644
--- a/kern/printf.h
+++ b/kern/printf.h
@@ -27,8 +27,6 @@
 #include <sys/types.h>
 #include <stdarg.h>
 
-extern void printf_init (void);
-
 extern void _doprnt (const char *fmt,
                     va_list argp, 
                     void (*putc)(char, vm_offset_t), 
diff --git a/kern/slab.c b/kern/slab.c
index 60378b5..1114cfa 100644
--- a/kern/slab.c
+++ b/kern/slab.c
@@ -1503,7 +1503,7 @@ kern_return_t host_slab_info(host_t host, 
cache_info_array_t *infop,
     i = 0;
 
     list_for_each_entry(&kmem_cache_list, cache, node) {
-        simple_lock(&cache_lock);
+        simple_lock(&cache->lock);
         info[i].flags = ((cache->flags & KMEM_CF_NO_CPU_POOL)
                          ? CACHE_FLAGS_NO_CPU_POOL : 0)
                         | ((cache->flags & KMEM_CF_SLAB_EXTERNAL)
diff --git a/kern/startup.c b/kern/startup.c
index f9f0c34..30cff5c 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -39,7 +39,6 @@
 #include <kern/machine.h>
 #include <kern/mach_factor.h>
 #include <kern/mach_clock.h>
-#include <kern/printf.h>
 #include <kern/processor.h>
 #include <kern/rdxtree.h>
 #include <kern/sched_prim.h>
@@ -109,7 +108,6 @@ void setup_main(void)
 #endif /* MACH_KDB */
 
        panic_init();
-       printf_init();
 
        sched_init();
        vm_mem_bootstrap();
diff --git a/kern/task.c b/kern/task.c
index b384347..9a3d848 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -783,7 +783,8 @@ kern_return_t task_info(
                                = task->total_system_time.seconds;
                basic_info->system_time.microseconds
                                = task->total_system_time.microseconds;
-               basic_info->creation_time = task->creation_time;
+               read_time_stamp(&task->creation_time,
+                               &basic_info->creation_time);
                task_unlock(task);
 
                if (*task_info_count > TASK_BASIC_INFO_COUNT)
diff --git a/kern/thread.c b/kern/thread.c
index 1f47553..865a1cc 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -1503,7 +1503,8 @@ kern_return_t thread_info(
                        &basic_info->system_time);
            basic_info->base_priority   = thread->priority;
            basic_info->cur_priority    = thread->sched_pri;
-           basic_info->creation_time  = thread->creation_time;
+           read_time_stamp(&thread->creation_time,
+                           &basic_info->creation_time);
 
            /*
             *  To calculate cpu_usage, first correct for timer rate,
diff --git a/linux/src/drivers/net/pci-scan.c b/linux/src/drivers/net/pci-scan.c
index 60525b7..ffb7b12 100644
--- a/linux/src/drivers/net/pci-scan.c
+++ b/linux/src/drivers/net/pci-scan.c
@@ -31,7 +31,7 @@ static int min_pci_latency = 32;
 #if ! defined(__KERNEL__)
 #define __KERNEL__ 1
 #endif
-#if !defined(__OPTIMIZE__)
+#if !defined(__OPTIMIZE__) && /* Mach glue, we think this is ok now: */ 0
 #warning  You must compile this file with the correct options!
 #warning  See the last lines of the source file.
 #error You must compile this driver with the proper options, including "-O".
diff --git a/version.m4 b/version.m4
index 9aab66b..7727c51 100644
--- a/version.m4
+++ b/version.m4
@@ -1,4 +1,4 @@
 m4_define([AC_PACKAGE_NAME],[GNU Mach])
-m4_define([AC_PACKAGE_VERSION],[1.4+git20150711])
+m4_define([AC_PACKAGE_VERSION],[1.5+git20150728])
 m4_define([AC_PACKAGE_BUGREPORT],address@hidden)
 m4_define([AC_PACKAGE_TARNAME],[gnumach])
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
index b13128a..51a6a0d 100644
--- a/vm/vm_pageout.c
+++ b/vm/vm_pageout.c
@@ -693,7 +693,7 @@ void vm_pageout_scan(void)
                    if (want_pages || m->external)
                      break;
                    
-                   m = (vm_page_t) queue_next (&m->listq);
+                   m = (vm_page_t) queue_next (&m->pageq);
                    if (!m)
                      goto pause;
                  }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/gnumach.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]