svn commit: r300070 - in projects/vnet: contrib/groff/tmac include lib/libbsdstat lib/libc/gen lib/libc/include lib/libpam/modules/pam_unix lib/libthr lib/libthr/thread sbin/ipfw share/doc/usd/07.m...
Bjoern A. Zeeb
bz at FreeBSD.org
Tue May 17 18:25:12 UTC 2016
Author: bz
Date: Tue May 17 18:25:09 2016
New Revision: 300070
URL: https://svnweb.freebsd.org/changeset/base/300070
Log:
MfH @300069
Sponsored by: The FreeBSD Foundation
Added:
projects/vnet/share/man/man3/pthread_mutex_consistent.3
- copied unchanged from r300069, head/share/man/man3/pthread_mutex_consistent.3
projects/vnet/sys/arm64/conf/GENERIC-INTRNG
- copied unchanged from r300069, head/sys/arm64/conf/GENERIC-INTRNG
projects/vnet/sys/dev/bhnd/bhnd_debug.h
- copied unchanged from r300069, head/sys/dev/bhnd/bhnd_debug.h
projects/vnet/sys/dev/bhnd/cores/pcie2/
- copied from r300069, head/sys/dev/bhnd/cores/pcie2/
projects/vnet/sys/dev/bwn/if_bwn_phy_n.c
- copied unchanged from r300069, head/sys/dev/bwn/if_bwn_phy_n.c
projects/vnet/sys/dev/bwn/if_bwn_phy_n.h
- copied unchanged from r300069, head/sys/dev/bwn/if_bwn_phy_n.h
projects/vnet/sys/dev/iscsi/icl_soft_proxy.c
- copied unchanged from r300069, head/sys/dev/iscsi/icl_soft_proxy.c
projects/vnet/sys/dev/usb/controller/generic_ohci.c
- copied unchanged from r300069, head/sys/dev/usb/controller/generic_ohci.c
projects/vnet/sys/dev/usb/controller/generic_usb_if.m
- copied unchanged from r300069, head/sys/dev/usb/controller/generic_usb_if.m
projects/vnet/sys/gnu/dev/
- copied from r300069, head/sys/gnu/dev/
projects/vnet/sys/gnu/dts/mips/CS-QR10.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/CS-QR10.dts
projects/vnet/sys/gnu/dts/mips/MZK-EX300NP.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/MZK-EX300NP.dts
projects/vnet/sys/gnu/dts/mips/MZK-EX750NP.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/MZK-EX750NP.dts
projects/vnet/sys/gnu/dts/mips/SK-WB8.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/SK-WB8.dts
projects/vnet/sys/gnu/dts/mips/WNDR3700V5.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/WNDR3700V5.dts
projects/vnet/sys/gnu/dts/mips/WRH-300CR.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/WRH-300CR.dts
projects/vnet/sys/gnu/dts/mips/ZBT-WG3526.dts
- copied unchanged from r300069, head/sys/gnu/dts/mips/ZBT-WG3526.dts
projects/vnet/sys/mips/broadcom/
- copied from r300069, head/sys/mips/broadcom/
projects/vnet/sys/mips/conf/BCM
- copied unchanged from r300069, head/sys/mips/conf/BCM
projects/vnet/sys/mips/conf/BCM.hints
- copied unchanged from r300069, head/sys/mips/conf/BCM.hints
Deleted:
projects/vnet/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi
projects/vnet/sys/dev/iscsi/icl_proxy.c
projects/vnet/sys/gnu/fs/
projects/vnet/sys/modules/reiserfs/
Modified:
projects/vnet/contrib/groff/tmac/doc-syms
projects/vnet/contrib/groff/tmac/groff_mdoc.man
projects/vnet/include/pthread.h
projects/vnet/lib/libbsdstat/bsdstat.c
projects/vnet/lib/libc/gen/Symbol.map
projects/vnet/lib/libc/gen/_pthread_stubs.c
projects/vnet/lib/libc/include/libc_private.h
projects/vnet/lib/libpam/modules/pam_unix/pam_unix.c
projects/vnet/lib/libthr/libthr.3
projects/vnet/lib/libthr/pthread.map
projects/vnet/lib/libthr/thread/thr_cond.c
projects/vnet/lib/libthr/thread/thr_init.c
projects/vnet/lib/libthr/thread/thr_mutex.c
projects/vnet/lib/libthr/thread/thr_mutexattr.c
projects/vnet/lib/libthr/thread/thr_private.h
projects/vnet/lib/libthr/thread/thr_umtx.c
projects/vnet/lib/libthr/thread/thr_umtx.h
projects/vnet/sbin/ipfw/ipfw2.c
projects/vnet/share/doc/usd/07.mail/mail6.nr
projects/vnet/share/man/man3/Makefile
projects/vnet/share/man/man3/pthread_cond_wait.3
projects/vnet/share/man/man3/pthread_mutex_lock.3
projects/vnet/share/man/man3/pthread_mutex_timedlock.3
projects/vnet/share/man/man3/pthread_mutex_trylock.3
projects/vnet/share/man/man3/pthread_mutex_unlock.3
projects/vnet/share/man/man3/pthread_mutexattr.3
projects/vnet/share/man/man4/gdb.4
projects/vnet/share/man/man9/BUS_GET_CPUS.9
projects/vnet/share/man/man9/Makefile
projects/vnet/share/man/man9/g_bio.9
projects/vnet/sys/amd64/vmm/io/vhpet.c
projects/vnet/sys/arm/allwinner/a10_ahci.c
projects/vnet/sys/arm/allwinner/files.allwinner
projects/vnet/sys/arm/arm/gic.c
projects/vnet/sys/arm/conf/A10
projects/vnet/sys/arm/conf/ALLWINNER
projects/vnet/sys/arm/conf/TEGRA124
projects/vnet/sys/arm/conf/std.armv6
projects/vnet/sys/arm/freescale/imx/imx_sdhci.c
projects/vnet/sys/arm/include/asm.h
projects/vnet/sys/arm64/arm64/autoconf.c
projects/vnet/sys/arm64/arm64/gic.c
projects/vnet/sys/arm64/arm64/gic.h
projects/vnet/sys/arm64/arm64/gic_v3.c
projects/vnet/sys/arm64/arm64/gic_v3_fdt.c
projects/vnet/sys/arm64/arm64/gic_v3_var.h
projects/vnet/sys/arm64/arm64/mp_machdep.c
projects/vnet/sys/arm64/arm64/nexus.c
projects/vnet/sys/arm64/include/intr.h
projects/vnet/sys/boot/common/bootstrap.h
projects/vnet/sys/boot/common/util.c
projects/vnet/sys/boot/efi/libefi/efi_console.c
projects/vnet/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi
projects/vnet/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi
projects/vnet/sys/boot/ficl/words.c
projects/vnet/sys/boot/i386/zfsboot/zfsboot.c
projects/vnet/sys/cam/cam_periph.c
projects/vnet/sys/cam/ctl/ctl_frontend_iscsi.c
projects/vnet/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
projects/vnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
projects/vnet/sys/compat/cloudabi/cloudabi_thread.c
projects/vnet/sys/compat/linux/linux_fork.c
projects/vnet/sys/compat/linuxkpi/common/include/linux/device.h
projects/vnet/sys/conf/Makefile.mips
projects/vnet/sys/conf/NOTES
projects/vnet/sys/conf/files
projects/vnet/sys/conf/files.arm64
projects/vnet/sys/conf/options
projects/vnet/sys/conf/options.arm64
projects/vnet/sys/ddb/db_examine.c
projects/vnet/sys/ddb/db_expr.c
projects/vnet/sys/ddb/db_lex.c
projects/vnet/sys/ddb/db_lex.h
projects/vnet/sys/dev/acpica/Osd/OsdSynch.c
projects/vnet/sys/dev/bhnd/bcma/bcma_bhndb.c
projects/vnet/sys/dev/bhnd/bhnd.c
projects/vnet/sys/dev/bhnd/bhnd.h
projects/vnet/sys/dev/bhnd/bhnd_bus_if.m
projects/vnet/sys/dev/bhnd/bhnd_ids.h
projects/vnet/sys/dev/bhnd/bhnd_subr.c
projects/vnet/sys/dev/bhnd/bhndb/bhndb.c
projects/vnet/sys/dev/bhnd/bhndb/bhndb_if.m
projects/vnet/sys/dev/bhnd/bhndb/bhndb_pci.c
projects/vnet/sys/dev/bhnd/bhndb/bhndb_pcireg.h
projects/vnet/sys/dev/bhnd/cores/chipc/bhnd_chipc_if.m
projects/vnet/sys/dev/bhnd/cores/chipc/chipc.c
projects/vnet/sys/dev/bhnd/cores/pci/bhnd_pci.c
projects/vnet/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
projects/vnet/sys/dev/bhnd/cores/pci/bhnd_pci_hostbvar.h
projects/vnet/sys/dev/bhnd/cores/pci/bhnd_pcib.c
projects/vnet/sys/dev/bhnd/cores/pci/bhnd_pcireg.h
projects/vnet/sys/dev/bhnd/nvram/nvram_map
projects/vnet/sys/dev/bhnd/siba/siba.c
projects/vnet/sys/dev/bhnd/siba/siba_bhndb.c
projects/vnet/sys/dev/bhnd/siba/sibavar.h
projects/vnet/sys/dev/bwn/bwn_mac.c
projects/vnet/sys/dev/bwn/if_bwn.c
projects/vnet/sys/dev/bwn/if_bwn_debug.h
projects/vnet/sys/dev/bwn/if_bwn_pci.c
projects/vnet/sys/dev/bwn/if_bwn_phy_common.c
projects/vnet/sys/dev/bwn/if_bwn_phy_g.c
projects/vnet/sys/dev/bwn/if_bwn_phy_lp.c
projects/vnet/sys/dev/bwn/if_bwn_util.c
projects/vnet/sys/dev/bxe/ecore_hsi.h
projects/vnet/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
projects/vnet/sys/dev/drm2/i915/intel_crt.c
projects/vnet/sys/dev/drm2/i915/intel_display.c
projects/vnet/sys/dev/drm2/radeon/atombios.h
projects/vnet/sys/dev/drm2/radeon/r300_reg.h
projects/vnet/sys/dev/drm2/radeon/radeon_device.c
projects/vnet/sys/dev/drm2/radeon/radeon_fence.c
projects/vnet/sys/dev/drm2/radeon/radeon_gart.c
projects/vnet/sys/dev/e1000/e1000_82575.c
projects/vnet/sys/dev/e1000/e1000_ich8lan.c
projects/vnet/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c
projects/vnet/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.h
projects/vnet/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
projects/vnet/sys/dev/iscsi/icl.c
projects/vnet/sys/dev/iscsi/icl.h
projects/vnet/sys/dev/iscsi/icl_conn_if.m
projects/vnet/sys/dev/iscsi/icl_soft.c
projects/vnet/sys/dev/iscsi/icl_wrappers.h
projects/vnet/sys/dev/iscsi/iscsi.c
projects/vnet/sys/dev/isp/isp.c
projects/vnet/sys/dev/isp/isp_freebsd.c
projects/vnet/sys/dev/isp/isp_library.c
projects/vnet/sys/dev/isp/ispvar.h
projects/vnet/sys/dev/iwm/if_iwmreg.h
projects/vnet/sys/dev/netmap/netmap.c
projects/vnet/sys/dev/ow/ow.c
projects/vnet/sys/dev/pci/pci_host_generic.c
projects/vnet/sys/dev/pci/pci_host_generic.h
projects/vnet/sys/dev/pms/RefTisa/sallsdk/spc/mpi.c
projects/vnet/sys/dev/pms/RefTisa/sat/src/smsat.c
projects/vnet/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
projects/vnet/sys/dev/ral/rt2860.c
projects/vnet/sys/dev/ral/rt2860reg.h
projects/vnet/sys/dev/ral/rt2860var.h
projects/vnet/sys/dev/random/fortuna.c
projects/vnet/sys/dev/rtwn/if_rtwn.c
projects/vnet/sys/dev/sfxge/common/ef10_ev.c
projects/vnet/sys/dev/sfxge/common/ef10_impl.h
projects/vnet/sys/dev/sfxge/common/ef10_mac.c
projects/vnet/sys/dev/sfxge/common/ef10_nic.c
projects/vnet/sys/dev/sfxge/common/efx.h
projects/vnet/sys/dev/sfxge/common/efx_impl.h
projects/vnet/sys/dev/sfxge/common/efx_lic.c
projects/vnet/sys/dev/sfxge/common/efx_mac.c
projects/vnet/sys/dev/sfxge/common/efx_mcdi.c
projects/vnet/sys/dev/sfxge/common/efx_nic.c
projects/vnet/sys/dev/sfxge/common/hunt_nic.c
projects/vnet/sys/dev/sfxge/common/medford_nic.c
projects/vnet/sys/dev/sfxge/common/siena_impl.h
projects/vnet/sys/dev/sfxge/common/siena_mac.c
projects/vnet/sys/dev/siba/siba_core.c
projects/vnet/sys/dev/siba/sibavar.h
projects/vnet/sys/dev/urtwn/if_urtwn.c
projects/vnet/sys/fs/autofs/autofs_vnops.c
projects/vnet/sys/gnu/dts/mips/3G-6200N.dts
projects/vnet/sys/gnu/dts/mips/3G-6200NL.dts
projects/vnet/sys/gnu/dts/mips/3G150B.dts
projects/vnet/sys/gnu/dts/mips/3G300M.dts
projects/vnet/sys/gnu/dts/mips/A5-V11.dts
projects/vnet/sys/gnu/dts/mips/AI-BR100.dts
projects/vnet/sys/gnu/dts/mips/AIR3GII.dts
projects/vnet/sys/gnu/dts/mips/ALL0239-3G.dts
projects/vnet/sys/gnu/dts/mips/ALL0256N-4M.dts
projects/vnet/sys/gnu/dts/mips/ALL0256N-8M.dts
projects/vnet/sys/gnu/dts/mips/ALL5002.dts
projects/vnet/sys/gnu/dts/mips/ALL5003.dts
projects/vnet/sys/gnu/dts/mips/AR670W.dts
projects/vnet/sys/gnu/dts/mips/AR725W.dts
projects/vnet/sys/gnu/dts/mips/ASL26555-16M.dts
projects/vnet/sys/gnu/dts/mips/ASL26555-8M.dts
projects/vnet/sys/gnu/dts/mips/ATP-52B.dts
projects/vnet/sys/gnu/dts/mips/AWAPN2403.dts
projects/vnet/sys/gnu/dts/mips/AWM002-4M.dtsi
projects/vnet/sys/gnu/dts/mips/AWM002-8M.dtsi
projects/vnet/sys/gnu/dts/mips/AWM002-EVB-4M.dts
projects/vnet/sys/gnu/dts/mips/AWM002-EVB-8M.dts
projects/vnet/sys/gnu/dts/mips/AWM002.dtsi
projects/vnet/sys/gnu/dts/mips/AWM003-EVB.dts
projects/vnet/sys/gnu/dts/mips/ArcherC20i.dts
projects/vnet/sys/gnu/dts/mips/BC2.dts
projects/vnet/sys/gnu/dts/mips/BR-6425.dts
projects/vnet/sys/gnu/dts/mips/BR-6475ND.dts
projects/vnet/sys/gnu/dts/mips/BROADWAY.dts
projects/vnet/sys/gnu/dts/mips/CARAMBOLA.dts
projects/vnet/sys/gnu/dts/mips/CF-WR800N.dts
projects/vnet/sys/gnu/dts/mips/CY-SWR1100.dts
projects/vnet/sys/gnu/dts/mips/D105.dts
projects/vnet/sys/gnu/dts/mips/DAP-1350.dts
projects/vnet/sys/gnu/dts/mips/DB-WRT01.dts
projects/vnet/sys/gnu/dts/mips/DCS-930.dts
projects/vnet/sys/gnu/dts/mips/DCS-930L-B1.dts
projects/vnet/sys/gnu/dts/mips/DIR-300-B1.dts
projects/vnet/sys/gnu/dts/mips/DIR-300-B7.dts
projects/vnet/sys/gnu/dts/mips/DIR-320-B1.dts
projects/vnet/sys/gnu/dts/mips/DIR-600-B1.dts
projects/vnet/sys/gnu/dts/mips/DIR-600-B2.dts
projects/vnet/sys/gnu/dts/mips/DIR-610-A1.dts
projects/vnet/sys/gnu/dts/mips/DIR-615-D.dts
projects/vnet/sys/gnu/dts/mips/DIR-615-H1.dts
projects/vnet/sys/gnu/dts/mips/DIR-620-A1.dts
projects/vnet/sys/gnu/dts/mips/DIR-620-D1.dts
projects/vnet/sys/gnu/dts/mips/DIR-645.dts
projects/vnet/sys/gnu/dts/mips/DIR-810L.dts
projects/vnet/sys/gnu/dts/mips/DIR-860L-B1.dts
projects/vnet/sys/gnu/dts/mips/E1700.dts
projects/vnet/sys/gnu/dts/mips/ESR-9753.dts
projects/vnet/sys/gnu/dts/mips/EX2700.dts
projects/vnet/sys/gnu/dts/mips/F5D8235_V1.dts
projects/vnet/sys/gnu/dts/mips/F5D8235_V2.dts
projects/vnet/sys/gnu/dts/mips/F7C027.dts
projects/vnet/sys/gnu/dts/mips/FIREWRT.dts
projects/vnet/sys/gnu/dts/mips/FONERA20N.dts
projects/vnet/sys/gnu/dts/mips/FREESTATION5.dts
projects/vnet/sys/gnu/dts/mips/GL-MT300A.dts
projects/vnet/sys/gnu/dts/mips/GL-MT300N.dts
projects/vnet/sys/gnu/dts/mips/GL-MT750.dts
projects/vnet/sys/gnu/dts/mips/HC5661.dts
projects/vnet/sys/gnu/dts/mips/HC5761.dts
projects/vnet/sys/gnu/dts/mips/HC5861.dts
projects/vnet/sys/gnu/dts/mips/HC5XXX.dtsi
projects/vnet/sys/gnu/dts/mips/HG255D.dts
projects/vnet/sys/gnu/dts/mips/HLKRM04.dts
projects/vnet/sys/gnu/dts/mips/HPM.dts
projects/vnet/sys/gnu/dts/mips/HT-TM02.dts
projects/vnet/sys/gnu/dts/mips/HW550-3G.dts
projects/vnet/sys/gnu/dts/mips/IP2202.dts
projects/vnet/sys/gnu/dts/mips/JHR-N805R.dts
projects/vnet/sys/gnu/dts/mips/JHR-N825R.dts
projects/vnet/sys/gnu/dts/mips/JHR-N926R.dts
projects/vnet/sys/gnu/dts/mips/LINKIT7688.dts
projects/vnet/sys/gnu/dts/mips/M2M.dts
projects/vnet/sys/gnu/dts/mips/M3.dts
projects/vnet/sys/gnu/dts/mips/M4-4M.dts
projects/vnet/sys/gnu/dts/mips/M4-8M.dts
projects/vnet/sys/gnu/dts/mips/MINIEMBPLUG.dts
projects/vnet/sys/gnu/dts/mips/MINIEMBWIFI.dts
projects/vnet/sys/gnu/dts/mips/MIWIFI-MINI.dts
projects/vnet/sys/gnu/dts/mips/MIWIFI-NANO.dts
projects/vnet/sys/gnu/dts/mips/MLW221.dts
projects/vnet/sys/gnu/dts/mips/MLWG2.dts
projects/vnet/sys/gnu/dts/mips/MOFI3500-3GN.dts
projects/vnet/sys/gnu/dts/mips/MPRA1.dts
projects/vnet/sys/gnu/dts/mips/MPRA2.dts
projects/vnet/sys/gnu/dts/mips/MR-102N.dts
projects/vnet/sys/gnu/dts/mips/MT7620a.dts
projects/vnet/sys/gnu/dts/mips/MT7620a_MT7530.dts
projects/vnet/sys/gnu/dts/mips/MT7620a_MT7610e.dts
projects/vnet/sys/gnu/dts/mips/MT7620a_V22SG.dts
projects/vnet/sys/gnu/dts/mips/MT7621.dts
projects/vnet/sys/gnu/dts/mips/MT7628.dts
projects/vnet/sys/gnu/dts/mips/MZK-750DHP.dts
projects/vnet/sys/gnu/dts/mips/MZK-DP150N.dts
projects/vnet/sys/gnu/dts/mips/MZK-W300NH2.dts
projects/vnet/sys/gnu/dts/mips/MZK-WDPR.dts
projects/vnet/sys/gnu/dts/mips/MicroWRT.dts
projects/vnet/sys/gnu/dts/mips/NA930.dts
projects/vnet/sys/gnu/dts/mips/NBG-419N.dts
projects/vnet/sys/gnu/dts/mips/NCS601W.dts
projects/vnet/sys/gnu/dts/mips/NW718.dts
projects/vnet/sys/gnu/dts/mips/OY-0001.dts
projects/vnet/sys/gnu/dts/mips/PBR-M1.dts
projects/vnet/sys/gnu/dts/mips/PSG1208.dts
projects/vnet/sys/gnu/dts/mips/PSR-680W.dts
projects/vnet/sys/gnu/dts/mips/PWH2004.dts
projects/vnet/sys/gnu/dts/mips/PX-4885-4M.dts
projects/vnet/sys/gnu/dts/mips/PX-4885-8M.dts
projects/vnet/sys/gnu/dts/mips/PX-4885.dtsi
projects/vnet/sys/gnu/dts/mips/RE6500.dts
projects/vnet/sys/gnu/dts/mips/RP-N53.dts
projects/vnet/sys/gnu/dts/mips/RT-G32-B1.dts
projects/vnet/sys/gnu/dts/mips/RT-N10-PLUS.dts
projects/vnet/sys/gnu/dts/mips/RT-N13U.dts
projects/vnet/sys/gnu/dts/mips/RT-N14U.dts
projects/vnet/sys/gnu/dts/mips/RT-N15.dts
projects/vnet/sys/gnu/dts/mips/RT-N56U.dts
projects/vnet/sys/gnu/dts/mips/RT5350F-OLINUXINO-EVB.dts
projects/vnet/sys/gnu/dts/mips/RT5350F-OLINUXINO.dts
projects/vnet/sys/gnu/dts/mips/RUT5XX.dts
projects/vnet/sys/gnu/dts/mips/SAP-G3200U3.dts
projects/vnet/sys/gnu/dts/mips/SL-R7205.dts
projects/vnet/sys/gnu/dts/mips/TEW-691GR.dts
projects/vnet/sys/gnu/dts/mips/TEW-692GR.dts
projects/vnet/sys/gnu/dts/mips/TINY-AC.dts
projects/vnet/sys/gnu/dts/mips/UBNT-ERX.dts
projects/vnet/sys/gnu/dts/mips/UR-326N4G.dts
projects/vnet/sys/gnu/dts/mips/UR-336UN.dts
projects/vnet/sys/gnu/dts/mips/V11STFE.dts
projects/vnet/sys/gnu/dts/mips/V22RW-2X2.dts
projects/vnet/sys/gnu/dts/mips/VOCORE-16M.dts
projects/vnet/sys/gnu/dts/mips/VOCORE-8M.dts
projects/vnet/sys/gnu/dts/mips/VOCORE.dtsi
projects/vnet/sys/gnu/dts/mips/W150M.dts
projects/vnet/sys/gnu/dts/mips/W306R_V20.dts
projects/vnet/sys/gnu/dts/mips/W502U.dts
projects/vnet/sys/gnu/dts/mips/WCR150GN.dts
projects/vnet/sys/gnu/dts/mips/WF-2881.dts
projects/vnet/sys/gnu/dts/mips/WHR-1166D.dts
projects/vnet/sys/gnu/dts/mips/WHR-300HP2.dts
projects/vnet/sys/gnu/dts/mips/WHR-600D.dts
projects/vnet/sys/gnu/dts/mips/WHR-G300N.dts
projects/vnet/sys/gnu/dts/mips/WITI.dts
projects/vnet/sys/gnu/dts/mips/WIZARD8800.dts
projects/vnet/sys/gnu/dts/mips/WIZFI630A.dts
projects/vnet/sys/gnu/dts/mips/WL-330N.dts
projects/vnet/sys/gnu/dts/mips/WL-330N3G.dts
projects/vnet/sys/gnu/dts/mips/WL-341V3.dts
projects/vnet/sys/gnu/dts/mips/WL-351.dts
projects/vnet/sys/gnu/dts/mips/WLI-TX4-AG300N.dts
projects/vnet/sys/gnu/dts/mips/WMR-300.dts
projects/vnet/sys/gnu/dts/mips/WNCE2001.dts
projects/vnet/sys/gnu/dts/mips/WR512-3GN-4M.dts
projects/vnet/sys/gnu/dts/mips/WR512-3GN-8M.dts
projects/vnet/sys/gnu/dts/mips/WR6202.dts
projects/vnet/sys/gnu/dts/mips/WRTNODE.dts
projects/vnet/sys/gnu/dts/mips/WRTNODE2.dtsi
projects/vnet/sys/gnu/dts/mips/WRTNODE2P.dts
projects/vnet/sys/gnu/dts/mips/WRTNODE2R.dts
projects/vnet/sys/gnu/dts/mips/WSR-1166.dts
projects/vnet/sys/gnu/dts/mips/WSR-600.dts
projects/vnet/sys/gnu/dts/mips/WT1520-4M.dts
projects/vnet/sys/gnu/dts/mips/WT1520-8M.dts
projects/vnet/sys/gnu/dts/mips/WT1520.dtsi
projects/vnet/sys/gnu/dts/mips/WT3020-4M.dts
projects/vnet/sys/gnu/dts/mips/WT3020-8M.dts
projects/vnet/sys/gnu/dts/mips/WZR-AGL300NH.dts
projects/vnet/sys/gnu/dts/mips/X5.dts
projects/vnet/sys/gnu/dts/mips/X8.dts
projects/vnet/sys/gnu/dts/mips/XDXRN502J.dts
projects/vnet/sys/gnu/dts/mips/Y1.dts
projects/vnet/sys/gnu/dts/mips/Y1.dtsi
projects/vnet/sys/gnu/dts/mips/Y1S.dts
projects/vnet/sys/gnu/dts/mips/YOUKU-YK1.dts
projects/vnet/sys/gnu/dts/mips/ZBT-WA05.dts
projects/vnet/sys/gnu/dts/mips/ZBT-WE826.dts
projects/vnet/sys/gnu/dts/mips/ZBT-WG2626.dts
projects/vnet/sys/gnu/dts/mips/ZBT-WR8305RT.dts
projects/vnet/sys/gnu/dts/mips/ZTE-Q7.dts
projects/vnet/sys/gnu/dts/mips/mt7620a.dtsi
projects/vnet/sys/gnu/dts/mips/mt7620n.dtsi
projects/vnet/sys/gnu/dts/mips/mt7621.dtsi
projects/vnet/sys/gnu/dts/mips/mt7628an.dtsi
projects/vnet/sys/gnu/dts/mips/rt2880.dtsi
projects/vnet/sys/gnu/dts/mips/rt3050.dtsi
projects/vnet/sys/gnu/dts/mips/rt3352.dtsi
projects/vnet/sys/gnu/dts/mips/rt3883.dtsi
projects/vnet/sys/gnu/dts/mips/rt5350.dtsi
projects/vnet/sys/kern/kern_exit.c
projects/vnet/sys/kern/kern_thr.c
projects/vnet/sys/kern/kern_thread.c
projects/vnet/sys/kern/kern_umtx.c
projects/vnet/sys/mips/conf/AR933X_BASE
projects/vnet/sys/mips/conf/AR934X_BASE
projects/vnet/sys/mips/conf/DIR-825C1.hints
projects/vnet/sys/mips/mediatek/mtk_pcie.c
projects/vnet/sys/modules/Makefile
projects/vnet/sys/modules/bhnd/cores/bhnd_pci/Makefile
projects/vnet/sys/modules/bhnd/cores/bhnd_pci_hostb/Makefile
projects/vnet/sys/modules/bhnd/cores/bhnd_pcib/Makefile
projects/vnet/sys/modules/bwn/Makefile
projects/vnet/sys/modules/iscsi/Makefile
projects/vnet/sys/net/altq/altq_cbq.c
projects/vnet/sys/net/vnet.c
projects/vnet/sys/net80211/ieee80211.c
projects/vnet/sys/net80211/ieee80211_ddb.c
projects/vnet/sys/net80211/ieee80211_var.h
projects/vnet/sys/netinet/ip_fw.h
projects/vnet/sys/netinet/tcp_stacks/fastpath.c
projects/vnet/sys/netinet/tcp_timer.c
projects/vnet/sys/netinet/tcp_var.h
projects/vnet/sys/netinet6/ip6_output.c
projects/vnet/sys/netpfil/ipfw/ip_fw_eaction.c
projects/vnet/sys/netpfil/ipfw/ip_fw_private.h
projects/vnet/sys/netpfil/ipfw/ip_fw_sockopt.c
projects/vnet/sys/netpfil/ipfw/ip_fw_table.c
projects/vnet/sys/ofed/drivers/infiniband/debug/memtrack.c
projects/vnet/sys/ofed/drivers/infiniband/debug/memtrack.h
projects/vnet/sys/ofed/drivers/net/mlx4/main.c
projects/vnet/sys/sys/_umtx.h
projects/vnet/sys/sys/proc.h
projects/vnet/sys/sys/umtx.h
projects/vnet/sys/ufs/ffs/ffs_vfsops.c
projects/vnet/sys/ufs/ufs/ufs_lookup.c
projects/vnet/sys/vm/vm_object.c
projects/vnet/sys/vm/vm_object.h
projects/vnet/sys/vm/vnode_pager.c
projects/vnet/sys/xen/interface/io/blkif.h
projects/vnet/usr.bin/chat/chat.c
projects/vnet/usr.bin/kdump/kdump.c
projects/vnet/usr.bin/ldd/ldd.c
projects/vnet/usr.bin/ncal/ncal.c
projects/vnet/usr.bin/numactl/numactl.1
projects/vnet/usr.bin/xinstall/tests/install_test.sh
projects/vnet/usr.bin/xinstall/xinstall.c
projects/vnet/usr.sbin/bsdconfig/share/dialog.subr
projects/vnet/usr.sbin/iscsid/login.c
projects/vnet/usr.sbin/makefs/cd9660.c
projects/vnet/usr.sbin/makefs/ffs.c
projects/vnet/usr.sbin/makefs/mtree.c
projects/vnet/usr.sbin/pciconf/pciconf.8
projects/vnet/usr.sbin/ppp/link.c
projects/vnet/usr.sbin/rarpd/rarpd.c
projects/vnet/usr.sbin/rpc.lockd/lock_proc.c
projects/vnet/usr.sbin/rpc.statd/file.c
Directory Properties:
projects/vnet/ (props changed)
projects/vnet/contrib/groff/ (props changed)
projects/vnet/sys/cddl/contrib/opensolaris/ (props changed)
Modified: projects/vnet/contrib/groff/tmac/doc-syms
==============================================================================
--- projects/vnet/contrib/groff/tmac/doc-syms Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/contrib/groff/tmac/doc-syms Tue May 17 18:25:09 2016 (r300070)
@@ -659,6 +659,8 @@
.as doc-str-St--susv2 " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq])
.ds doc-str-St--susv3 Version\~3 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
.as doc-str-St--susv3 " (\*[Lq]\*[doc-Tn-font-size]SUSv3\*[doc-str-St]\*[Rq])
+.ds doc-str-St--susv4 Version\~4 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification
+.as doc-str-St--susv4 " (\*[Lq]\*[doc-Tn-font-size]SUSv4\*[doc-str-St]\*[Rq])
.ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition
.as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq])
.ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] Base Definitions Issue\~5
Modified: projects/vnet/contrib/groff/tmac/groff_mdoc.man
==============================================================================
--- projects/vnet/contrib/groff/tmac/groff_mdoc.man Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/contrib/groff/tmac/groff_mdoc.man Tue May 17 18:25:09 2016 (r300070)
@@ -2097,6 +2097,8 @@ X/Open
.St -susv2
.It Li \-susv3
.St -susv3
+.It Li \-susv4
+.St -susv4
.It Li \-svid4
.St -svid4
.It Li \-xbd5
Modified: projects/vnet/include/pthread.h
==============================================================================
--- projects/vnet/include/pthread.h Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/include/pthread.h Tue May 17 18:25:09 2016 (r300070)
@@ -135,6 +135,9 @@ enum pthread_mutextype {
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK
+#define PTHREAD_MUTEX_STALLED 0
+#define PTHREAD_MUTEX_ROBUST 1
+
struct _pthread_cleanup_info {
__uintptr_t pthread_cleanup_pad[8];
};
@@ -229,6 +232,8 @@ int pthread_mutexattr_settype(pthread_m
__nonnull(1);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int)
__nonnull(1);
+int pthread_mutex_consistent(pthread_mutex_t *__mutex)
+ __nonnull(1) __requires_exclusive(*__mutex);
int pthread_mutex_destroy(pthread_mutex_t *__mutex)
__nonnull(1) __requires_unlocked(*__mutex);
int pthread_mutex_init(pthread_mutex_t *__mutex,
@@ -310,6 +315,11 @@ int pthread_mutex_setprioceiling(pthrea
int pthread_mutexattr_getprotocol(pthread_mutexattr_t *, int *);
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
+int pthread_mutexattr_getrobust(pthread_mutexattr_t *__restrict,
+ int *__restrict) __nonnull_all;
+int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int)
+ __nonnull(1);
+
int pthread_attr_getinheritsched(const pthread_attr_t *, int *);
int pthread_attr_getschedparam(const pthread_attr_t *,
struct sched_param *) __nonnull_all;
Modified: projects/vnet/lib/libbsdstat/bsdstat.c
==============================================================================
--- projects/vnet/lib/libbsdstat/bsdstat.c Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libbsdstat/bsdstat.c Tue May 17 18:25:09 2016 (r300070)
@@ -53,7 +53,7 @@ bsdstat_setfmt(struct bsdstat *sf, const
"skipped\n", sf->name, tok);
continue;
}
- if (j+3 > (int) sizeof(sf->fmts)) {
+ if (j+4 > (int) sizeof(sf->fmts)) {
fprintf(stderr, "%s: not enough room for all stats; "
"stopped at %s\n", sf->name, tok);
break;
Modified: projects/vnet/lib/libc/gen/Symbol.map
==============================================================================
--- projects/vnet/lib/libc/gen/Symbol.map Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libc/gen/Symbol.map Tue May 17 18:25:09 2016 (r300070)
@@ -410,6 +410,9 @@ FBSD_1.3 {
};
FBSD_1.4 {
+ pthread_mutex_consistent;
+ pthread_mutexattr_getrobust;
+ pthread_mutexattr_setrobust;
scandir_b;
};
Modified: projects/vnet/lib/libc/gen/_pthread_stubs.c
==============================================================================
--- projects/vnet/lib/libc/gen/_pthread_stubs.c Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libc/gen/_pthread_stubs.c Tue May 17 18:25:09 2016 (r300070)
@@ -125,6 +125,9 @@ pthread_func_entry_t __thr_jtable[PJT_MA
{PJT_DUAL_ENTRY(stub_zero)}, /* PJT_CLEANUP_PUSH_IMP */
{PJT_DUAL_ENTRY(stub_zero)}, /* PJT_CANCEL_ENTER */
{PJT_DUAL_ENTRY(stub_zero)}, /* PJT_CANCEL_LEAVE */
+ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEX_CONSISTENT */
+ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEXATTR_GETROBUST */
+ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_MUTEXATTR_SETROBUST */
};
/*
@@ -226,9 +229,14 @@ STUB_FUNC2(pthread_mutex_init, PJT_MUTEX
STUB_FUNC1(pthread_mutex_lock, PJT_MUTEX_LOCK, int, void *)
STUB_FUNC1(pthread_mutex_trylock, PJT_MUTEX_TRYLOCK, int, void *)
STUB_FUNC1(pthread_mutex_unlock, PJT_MUTEX_UNLOCK, int, void *)
+STUB_FUNC1(pthread_mutex_consistent, PJT_MUTEX_CONSISTENT, int, void *)
STUB_FUNC1(pthread_mutexattr_destroy, PJT_MUTEXATTR_DESTROY, int, void *)
STUB_FUNC1(pthread_mutexattr_init, PJT_MUTEXATTR_INIT, int, void *)
STUB_FUNC2(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *, int)
+STUB_FUNC2(pthread_mutexattr_getrobust, PJT_MUTEXATTR_GETROBUST, int, void *,
+ int *)
+STUB_FUNC2(pthread_mutexattr_setrobust, PJT_MUTEXATTR_SETROBUST, int, void *,
+ int)
STUB_FUNC2(pthread_once, PJT_ONCE, int, void *, void *)
STUB_FUNC1(pthread_rwlock_destroy, PJT_RWLOCK_DESTROY, int, void *)
STUB_FUNC2(pthread_rwlock_init, PJT_RWLOCK_INIT, int, void *, void *)
Modified: projects/vnet/lib/libc/include/libc_private.h
==============================================================================
--- projects/vnet/lib/libc/include/libc_private.h Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libc/include/libc_private.h Tue May 17 18:25:09 2016 (r300070)
@@ -168,6 +168,9 @@ typedef enum {
PJT_CLEANUP_PUSH_IMP,
PJT_CANCEL_ENTER,
PJT_CANCEL_LEAVE,
+ PJT_MUTEX_CONSISTENT,
+ PJT_MUTEXATTR_GETROBUST,
+ PJT_MUTEXATTR_SETROBUST,
PJT_MAX
} pjt_index_t;
Modified: projects/vnet/lib/libpam/modules/pam_unix/pam_unix.c
==============================================================================
--- projects/vnet/lib/libpam/modules/pam_unix/pam_unix.c Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libpam/modules/pam_unix/pam_unix.c Tue May 17 18:25:09 2016 (r300070)
@@ -332,6 +332,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
* XXX check PAM_DISALLOW_NULL_AUTHTOK
*/
old_pass = "";
+ retval = PAM_SUCCESS;
} else {
retval = pam_get_authtok(pamh,
PAM_OLDAUTHTOK, &old_pass, NULL);
Modified: projects/vnet/lib/libthr/libthr.3
==============================================================================
--- projects/vnet/lib/libthr/libthr.3 Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libthr/libthr.3 Tue May 17 18:25:09 2016 (r300070)
@@ -118,7 +118,7 @@ environment variable.
If both the spin and yield loops
failed to acquire the lock, the thread is taken off the CPU and
put to sleep in the kernel with the
-.Xr umtx 2
+.Xr _umtx_op 2
syscall.
The kernel wakes up a thread and hands the ownership of the lock to
the woken thread when the lock becomes available.
@@ -236,7 +236,7 @@ logs.
.Xr ld-elf.so.1 1 ,
.Xr getrlimit 2 ,
.Xr errno 2 ,
-.Xr umtx 2 ,
+.Xr _umtx_op 2 ,
.Xr dlclose 3 ,
.Xr dlopen 3 ,
.Xr getenv 3 ,
Modified: projects/vnet/lib/libthr/pthread.map
==============================================================================
--- projects/vnet/lib/libthr/pthread.map Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libthr/pthread.map Tue May 17 18:25:09 2016 (r300070)
@@ -315,3 +315,9 @@ FBSD_1.1 {
FBSD_1.2 {
pthread_getthreadid_np;
};
+
+FBSD_1.4 {
+ pthread_mutex_consistent;
+ pthread_mutexattr_getrobust;
+ pthread_mutexattr_setrobust;
+};
Modified: projects/vnet/lib/libthr/thread/thr_cond.c
==============================================================================
--- projects/vnet/lib/libthr/thread/thr_cond.c Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libthr/thread/thr_cond.c Tue May 17 18:25:09 2016 (r300070)
@@ -188,46 +188,57 @@ _pthread_cond_destroy(pthread_cond_t *co
*/
static int
cond_wait_kernel(struct pthread_cond *cvp, struct pthread_mutex *mp,
- const struct timespec *abstime, int cancel)
+ const struct timespec *abstime, int cancel)
{
- struct pthread *curthread = _get_curthread();
- int recurse;
- int error, error2 = 0;
+ struct pthread *curthread;
+ int error, error2, recurse, robust;
+
+ curthread = _get_curthread();
+ robust = _mutex_enter_robust(curthread, mp);
error = _mutex_cv_detach(mp, &recurse);
- if (error != 0)
+ if (error != 0) {
+ if (robust)
+ _mutex_leave_robust(curthread, mp);
return (error);
+ }
- if (cancel) {
+ if (cancel)
_thr_cancel_enter2(curthread, 0);
- error = _thr_ucond_wait((struct ucond *)&cvp->__has_kern_waiters,
- (struct umutex *)&mp->m_lock, abstime,
- CVWAIT_ABSTIME|CVWAIT_CLOCKID);
+ error = _thr_ucond_wait((struct ucond *)&cvp->__has_kern_waiters,
+ (struct umutex *)&mp->m_lock, abstime, CVWAIT_ABSTIME |
+ CVWAIT_CLOCKID);
+ if (cancel)
_thr_cancel_leave(curthread, 0);
- } else {
- error = _thr_ucond_wait((struct ucond *)&cvp->__has_kern_waiters,
- (struct umutex *)&mp->m_lock, abstime,
- CVWAIT_ABSTIME|CVWAIT_CLOCKID);
- }
/*
* Note that PP mutex and ROBUST mutex may return
* interesting error codes.
*/
if (error == 0) {
- error2 = _mutex_cv_lock(mp, recurse);
+ error2 = _mutex_cv_lock(mp, recurse, true);
} else if (error == EINTR || error == ETIMEDOUT) {
- error2 = _mutex_cv_lock(mp, recurse);
+ error2 = _mutex_cv_lock(mp, recurse, true);
+ /*
+ * Do not do cancellation on EOWNERDEAD there. The
+ * cancellation cleanup handler will use the protected
+ * state and unlock the mutex without making the state
+ * consistent and the state will be unrecoverable.
+ */
if (error2 == 0 && cancel)
_thr_testcancel(curthread);
+
if (error == EINTR)
error = 0;
} else {
/* We know that it didn't unlock the mutex. */
- error2 = _mutex_cv_attach(mp, recurse);
- if (error2 == 0 && cancel)
+ _mutex_cv_attach(mp, recurse);
+ if (cancel)
_thr_testcancel(curthread);
+ error2 = 0;
}
+ if (robust)
+ _mutex_leave_robust(curthread, mp);
return (error2 != 0 ? error2 : error);
}
@@ -240,14 +251,13 @@ cond_wait_kernel(struct pthread_cond *cv
static int
cond_wait_user(struct pthread_cond *cvp, struct pthread_mutex *mp,
- const struct timespec *abstime, int cancel)
+ const struct timespec *abstime, int cancel)
{
- struct pthread *curthread = _get_curthread();
+ struct pthread *curthread;
struct sleepqueue *sq;
- int recurse;
- int error;
- int defered;
+ int deferred, error, error2, recurse;
+ curthread = _get_curthread();
if (curthread->wchan != NULL)
PANIC("thread was already on queue.");
@@ -260,32 +270,31 @@ cond_wait_user(struct pthread_cond *cvp,
* us to check it without locking in pthread_cond_signal().
*/
cvp->__has_user_waiters = 1;
- defered = 0;
- (void)_mutex_cv_unlock(mp, &recurse, &defered);
+ deferred = 0;
+ (void)_mutex_cv_unlock(mp, &recurse, &deferred);
curthread->mutex_obj = mp;
_sleepq_add(cvp, curthread);
for(;;) {
_thr_clear_wake(curthread);
_sleepq_unlock(cvp);
- if (defered) {
- defered = 0;
+ if (deferred) {
+ deferred = 0;
if ((mp->m_lock.m_owner & UMUTEX_CONTESTED) == 0)
- (void)_umtx_op_err(&mp->m_lock, UMTX_OP_MUTEX_WAKE2,
- mp->m_lock.m_flags, 0, 0);
+ (void)_umtx_op_err(&mp->m_lock,
+ UMTX_OP_MUTEX_WAKE2, mp->m_lock.m_flags,
+ 0, 0);
}
if (curthread->nwaiter_defer > 0) {
_thr_wake_all(curthread->defer_waiters,
- curthread->nwaiter_defer);
+ curthread->nwaiter_defer);
curthread->nwaiter_defer = 0;
}
- if (cancel) {
+ if (cancel)
_thr_cancel_enter2(curthread, 0);
- error = _thr_sleep(curthread, cvp->__clock_id, abstime);
+ error = _thr_sleep(curthread, cvp->__clock_id, abstime);
+ if (cancel)
_thr_cancel_leave(curthread, 0);
- } else {
- error = _thr_sleep(curthread, cvp->__clock_id, abstime);
- }
_sleepq_lock(cvp);
if (curthread->wchan == NULL) {
@@ -293,25 +302,26 @@ cond_wait_user(struct pthread_cond *cvp,
break;
} else if (cancel && SHOULD_CANCEL(curthread)) {
sq = _sleepq_lookup(cvp);
- cvp->__has_user_waiters =
- _sleepq_remove(sq, curthread);
+ cvp->__has_user_waiters = _sleepq_remove(sq, curthread);
_sleepq_unlock(cvp);
curthread->mutex_obj = NULL;
- _mutex_cv_lock(mp, recurse);
+ error2 = _mutex_cv_lock(mp, recurse, false);
if (!THR_IN_CRITICAL(curthread))
_pthread_exit(PTHREAD_CANCELED);
else /* this should not happen */
- return (0);
+ return (error2);
} else if (error == ETIMEDOUT) {
sq = _sleepq_lookup(cvp);
cvp->__has_user_waiters =
- _sleepq_remove(sq, curthread);
+ _sleepq_remove(sq, curthread);
break;
}
}
_sleepq_unlock(cvp);
curthread->mutex_obj = NULL;
- _mutex_cv_lock(mp, recurse);
+ error2 = _mutex_cv_lock(mp, recurse, false);
+ if (error == 0)
+ error = error2;
return (error);
}
@@ -338,12 +348,12 @@ cond_wait_common(pthread_cond_t *cond, p
return (error);
if (curthread->attr.sched_policy != SCHED_OTHER ||
- (mp->m_lock.m_flags & (UMUTEX_PRIO_PROTECT|UMUTEX_PRIO_INHERIT|
- USYNC_PROCESS_SHARED)) != 0 ||
+ (mp->m_lock.m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT |
+ USYNC_PROCESS_SHARED)) != 0 ||
(cvp->__flags & USYNC_PROCESS_SHARED) != 0)
- return cond_wait_kernel(cvp, mp, abstime, cancel);
+ return (cond_wait_kernel(cvp, mp, abstime, cancel));
else
- return cond_wait_user(cvp, mp, abstime, cancel);
+ return (cond_wait_user(cvp, mp, abstime, cancel));
}
int
@@ -420,15 +430,15 @@ cond_signal_common(pthread_cond_t *cond)
td = _sleepq_first(sq);
mp = td->mutex_obj;
cvp->__has_user_waiters = _sleepq_remove(sq, td);
- if (mp->m_owner == TID(curthread)) {
+ if (PMUTEX_OWNER_ID(mp) == TID(curthread)) {
if (curthread->nwaiter_defer >= MAX_DEFER_WAITERS) {
_thr_wake_all(curthread->defer_waiters,
- curthread->nwaiter_defer);
+ curthread->nwaiter_defer);
curthread->nwaiter_defer = 0;
}
curthread->defer_waiters[curthread->nwaiter_defer++] =
- &td->wake_addr->value;
- mp->m_flags |= PMUTEX_FLAG_DEFERED;
+ &td->wake_addr->value;
+ mp->m_flags |= PMUTEX_FLAG_DEFERRED;
} else {
waddr = &td->wake_addr->value;
}
@@ -452,15 +462,15 @@ drop_cb(struct pthread *td, void *arg)
struct pthread *curthread = ba->curthread;
mp = td->mutex_obj;
- if (mp->m_owner == TID(curthread)) {
+ if (PMUTEX_OWNER_ID(mp) == TID(curthread)) {
if (curthread->nwaiter_defer >= MAX_DEFER_WAITERS) {
_thr_wake_all(curthread->defer_waiters,
- curthread->nwaiter_defer);
+ curthread->nwaiter_defer);
curthread->nwaiter_defer = 0;
}
curthread->defer_waiters[curthread->nwaiter_defer++] =
- &td->wake_addr->value;
- mp->m_flags |= PMUTEX_FLAG_DEFERED;
+ &td->wake_addr->value;
+ mp->m_flags |= PMUTEX_FLAG_DEFERRED;
} else {
if (ba->count >= MAX_DEFER_WAITERS) {
_thr_wake_all(ba->waddrs, ba->count);
Modified: projects/vnet/lib/libthr/thread/thr_init.c
==============================================================================
--- projects/vnet/lib/libthr/thread/thr_init.c Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libthr/thread/thr_init.c Tue May 17 18:25:09 2016 (r300070)
@@ -94,6 +94,7 @@ struct pthread_mutex_attr _pthread_mutex
.m_protocol = PTHREAD_PRIO_NONE,
.m_ceiling = 0,
.m_pshared = PTHREAD_PROCESS_PRIVATE,
+ .m_robust = PTHREAD_MUTEX_STALLED,
};
struct pthread_mutex_attr _pthread_mutexattr_adaptive_default = {
@@ -101,6 +102,7 @@ struct pthread_mutex_attr _pthread_mutex
.m_protocol = PTHREAD_PRIO_NONE,
.m_ceiling = 0,
.m_pshared = PTHREAD_PROCESS_PRIVATE,
+ .m_robust = PTHREAD_MUTEX_STALLED,
};
/* Default condition variable attributes: */
@@ -265,7 +267,10 @@ static pthread_func_t jmp_table[][2] = {
{DUAL_ENTRY(__pthread_cleanup_pop_imp)},/* PJT_CLEANUP_POP_IMP */
{DUAL_ENTRY(__pthread_cleanup_push_imp)},/* PJT_CLEANUP_PUSH_IMP */
{DUAL_ENTRY(_pthread_cancel_enter)}, /* PJT_CANCEL_ENTER */
- {DUAL_ENTRY(_pthread_cancel_leave)} /* PJT_CANCEL_LEAVE */
+ {DUAL_ENTRY(_pthread_cancel_leave)}, /* PJT_CANCEL_LEAVE */
+ {DUAL_ENTRY(_pthread_mutex_consistent)},/* PJT_MUTEX_CONSISTENT */
+ {DUAL_ENTRY(_pthread_mutexattr_getrobust)},/* PJT_MUTEXATTR_GETROBUST */
+ {DUAL_ENTRY(_pthread_mutexattr_setrobust)},/* PJT_MUTEXATTR_SETROBUST */
};
static int init_once = 0;
@@ -308,7 +313,7 @@ _libpthread_init(struct pthread *curthre
int first, dlopened;
/* Check if this function has already been called: */
- if ((_thr_initial != NULL) && (curthread == NULL))
+ if (_thr_initial != NULL && curthread == NULL)
/* Only initialize the threaded application once. */
return;
@@ -316,7 +321,7 @@ _libpthread_init(struct pthread *curthre
* Check the size of the jump table to make sure it is preset
* with the correct number of entries.
*/
- if (sizeof(jmp_table) != (sizeof(pthread_func_t) * PJT_MAX * 2))
+ if (sizeof(jmp_table) != sizeof(pthread_func_t) * PJT_MAX * 2)
PANIC("Thread jump table not properly initialized");
memcpy(__thr_jtable, jmp_table, sizeof(jmp_table));
__thr_interpose_libc();
Modified: projects/vnet/lib/libthr/thread/thr_mutex.c
==============================================================================
--- projects/vnet/lib/libthr/thread/thr_mutex.c Tue May 17 18:20:33 2016 (r300069)
+++ projects/vnet/lib/libthr/thread/thr_mutex.c Tue May 17 18:25:09 2016 (r300070)
@@ -1,7 +1,7 @@
/*
* Copyright (c) 1995 John Birrell <jb at cimlogic.com.au>.
* Copyright (c) 2006 David Xu <davidxu at freebsd.org>.
- * Copyright (c) 2015 The FreeBSD Foundation
+ * Copyright (c) 2015, 2016 The FreeBSD Foundation
*
* All rights reserved.
*
@@ -39,7 +39,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <stdbool.h>
#include "namespace.h"
#include <stdlib.h>
#include <errno.h>
@@ -64,6 +63,7 @@ _Static_assert(sizeof(struct pthread_mut
/*
* Prototypes
*/
+int __pthread_mutex_consistent(pthread_mutex_t *mutex);
int __pthread_mutex_init(pthread_mutex_t *mutex,
const pthread_mutexattr_t *mutex_attr);
int __pthread_mutex_trylock(pthread_mutex_t *mutex);
@@ -82,9 +82,13 @@ int __pthread_mutex_setyieldloops_np(pth
static int mutex_self_trylock(pthread_mutex_t);
static int mutex_self_lock(pthread_mutex_t,
const struct timespec *abstime);
-static int mutex_unlock_common(struct pthread_mutex *, int, int *);
+static int mutex_unlock_common(struct pthread_mutex *, bool, int *);
static int mutex_lock_sleep(struct pthread *, pthread_mutex_t,
const struct timespec *);
+static void mutex_init_robust(struct pthread *curthread);
+static int mutex_qidx(struct pthread_mutex *m);
+static bool is_robust_mutex(struct pthread_mutex *m);
+static bool is_pshared_mutex(struct pthread_mutex *m);
__weak_reference(__pthread_mutex_init, pthread_mutex_init);
__strong_reference(__pthread_mutex_init, _pthread_mutex_init);
@@ -94,6 +98,8 @@ __weak_reference(__pthread_mutex_timedlo
__strong_reference(__pthread_mutex_timedlock, _pthread_mutex_timedlock);
__weak_reference(__pthread_mutex_trylock, pthread_mutex_trylock);
__strong_reference(__pthread_mutex_trylock, _pthread_mutex_trylock);
+__weak_reference(_pthread_mutex_consistent, pthread_mutex_consistent);
+__strong_reference(_pthread_mutex_consistent, __pthread_mutex_consistent);
/* Single underscore versions provided for libc internal usage: */
/* No difference between libc and application usage of these: */
@@ -125,23 +131,23 @@ mutex_init_link(struct pthread_mutex *m)
}
static void
-mutex_assert_is_owned(struct pthread_mutex *m)
+mutex_assert_is_owned(struct pthread_mutex *m __unused)
{
#if defined(_PTHREADS_INVARIANTS)
if (__predict_false(m->m_qe.tqe_prev == NULL)) {
char msg[128];
snprintf(msg, sizeof(msg),
- "mutex %p own %#x %#x is not on list %p %p",
- m, m->m_lock.m_owner, m->m_owner, m->m_qe.tqe_prev,
- m->m_qe.tqe_next);
+ "mutex %p own %#x is not on list %p %p",
+ m, m->m_lock.m_owner, m->m_qe.tqe_prev, m->m_qe.tqe_next);
PANIC(msg);
}
#endif
}
static void
-mutex_assert_not_owned(struct pthread_mutex *m)
+mutex_assert_not_owned(struct pthread *curthread __unused,
+ struct pthread_mutex *m __unused)
{
#if defined(_PTHREADS_INVARIANTS)
@@ -149,21 +155,68 @@ mutex_assert_not_owned(struct pthread_mu
m->m_qe.tqe_next != NULL)) {
char msg[128];
snprintf(msg, sizeof(msg),
- "mutex %p own %#x %#x is on list %p %p",
- m, m->m_lock.m_owner, m->m_owner, m->m_qe.tqe_prev,
- m->m_qe.tqe_next);
+ "mutex %p own %#x is on list %p %p",
+ m, m->m_lock.m_owner, m->m_qe.tqe_prev, m->m_qe.tqe_next);
+ PANIC(msg);
+ }
+ if (__predict_false(is_robust_mutex(m) &&
+ (m->m_lock.m_rb_lnk != 0 || m->m_rb_prev != NULL ||
+ (is_pshared_mutex(m) && curthread->robust_list ==
+ (uintptr_t)&m->m_lock) ||
+ (!is_pshared_mutex(m) && curthread->priv_robust_list ==
+ (uintptr_t)&m->m_lock)))) {
+ char msg[128];
+ snprintf(msg, sizeof(msg),
+ "mutex %p own %#x is on robust linkage %p %p head %p phead %p",
+ m, m->m_lock.m_owner, (void *)m->m_lock.m_rb_lnk,
+ m->m_rb_prev, (void *)curthread->robust_list,
+ (void *)curthread->priv_robust_list);
PANIC(msg);
}
#endif
}
-static int
+static bool
is_pshared_mutex(struct pthread_mutex *m)
{
return ((m->m_lock.m_flags & USYNC_PROCESS_SHARED) != 0);
}
+static bool
+is_robust_mutex(struct pthread_mutex *m)
+{
+
+ return ((m->m_lock.m_flags & UMUTEX_ROBUST) != 0);
+}
+
+int
+_mutex_enter_robust(struct pthread *curthread, struct pthread_mutex *m)
+{
+
+#if defined(_PTHREADS_INVARIANTS)
+ if (__predict_false(curthread->inact_mtx != 0))
+ PANIC("inact_mtx enter");
+#endif
+ if (!is_robust_mutex(m))
+ return (0);
+
+ mutex_init_robust(curthread);
+ curthread->inact_mtx = (uintptr_t)&m->m_lock;
+ return (1);
+}
+
+void
+_mutex_leave_robust(struct pthread *curthread, struct pthread_mutex *m __unused)
+{
+
+#if defined(_PTHREADS_INVARIANTS)
+ if (__predict_false(curthread->inact_mtx != (uintptr_t)&m->m_lock))
+ PANIC("inact_mtx leave");
+#endif
+ curthread->inact_mtx = 0;
+}
+
static int
mutex_check_attr(const struct pthread_mutex_attr *attr)
{
@@ -178,12 +231,27 @@ mutex_check_attr(const struct pthread_mu
}
static void
+mutex_init_robust(struct pthread *curthread)
+{
+ struct umtx_robust_lists_params rb;
+
+ if (curthread == NULL)
+ curthread = _get_curthread();
+ if (curthread->robust_inited)
+ return;
+ rb.robust_list_offset = (uintptr_t)&curthread->robust_list;
+ rb.robust_priv_list_offset = (uintptr_t)&curthread->priv_robust_list;
+ rb.robust_inact_offset = (uintptr_t)&curthread->inact_mtx;
+ _umtx_op(NULL, UMTX_OP_ROBUST_LISTS, sizeof(rb), &rb, NULL);
+ curthread->robust_inited = 1;
+}
+
+static void
mutex_init_body(struct pthread_mutex *pmutex,
const struct pthread_mutex_attr *attr)
{
pmutex->m_flags = attr->m_type;
- pmutex->m_owner = 0;
pmutex->m_count = 0;
pmutex->m_spinloops = 0;
pmutex->m_yieldloops = 0;
@@ -205,7 +273,10 @@ mutex_init_body(struct pthread_mutex *pm
}
if (attr->m_pshared == PTHREAD_PROCESS_SHARED)
pmutex->m_lock.m_flags |= USYNC_PROCESS_SHARED;
-
+ if (attr->m_robust == PTHREAD_MUTEX_ROBUST) {
+ mutex_init_robust(NULL);
+ pmutex->m_lock.m_flags |= UMUTEX_ROBUST;
+ }
if (PMUTEX_TYPE(pmutex->m_flags) == PTHREAD_MUTEX_ADAPTIVE_NP) {
pmutex->m_spinloops =
_thr_spinloops ? _thr_spinloops: MUTEX_ADAPTIVE_SPINS;
@@ -262,7 +333,7 @@ set_inherited_priority(struct pthread *c
{
struct pthread_mutex *m2;
- m2 = TAILQ_LAST(&curthread->mq[TMQ_NORM_PP], mutex_queue);
+ m2 = TAILQ_LAST(&curthread->mq[mutex_qidx(m)], mutex_queue);
if (m2 != NULL)
m->m_lock.m_ceilings[1] = m2->m_lock.m_ceilings[0];
else
@@ -277,7 +348,8 @@ shared_mutex_init(struct pthread_mutex *
.m_type = PTHREAD_MUTEX_DEFAULT,
.m_protocol = PTHREAD_PRIO_NONE,
.m_ceiling = 0,
- .m_pshared = PTHREAD_PROCESS_SHARED
+ .m_pshared = PTHREAD_PROCESS_SHARED,
+ .m_robust = PTHREAD_MUTEX_STALLED,
};
bool done;
@@ -329,7 +401,7 @@ __pthread_mutex_init(pthread_mutex_t *mu
if (mutex_attr == NULL ||
(*mutex_attr)->m_pshared == PTHREAD_PROCESS_PRIVATE) {
return (mutex_init(mutex, mutex_attr ? *mutex_attr : NULL,
- calloc));
+ calloc));
}
pmtx = __thr_pshared_offpage(mutex, 1);
if (pmtx == NULL)
@@ -349,6 +421,7 @@ _pthread_mutex_init_calloc_cb(pthread_mu
.m_protocol = PTHREAD_PRIO_NONE,
.m_ceiling = 0,
.m_pshared = PTHREAD_PROCESS_PRIVATE,
+ .m_robust = PTHREAD_MUTEX_STALLED,
};
int ret;
@@ -378,7 +451,6 @@ queue_fork(struct pthread *curthread, st
TAILQ_FOREACH(m, qp, m_pqe) {
TAILQ_INSERT_TAIL(q, m, m_qe);
m->m_lock.m_owner = TID(curthread) | bit;
- m->m_owner = TID(curthread);
}
}
@@ -390,6 +462,9 @@ _mutex_fork(struct pthread *curthread)
&curthread->mq[TMQ_NORM_PRIV], 0);
queue_fork(curthread, &curthread->mq[TMQ_NORM_PP],
&curthread->mq[TMQ_NORM_PP_PRIV], UMUTEX_CONTESTED);
+ queue_fork(curthread, &curthread->mq[TMQ_ROBUST_PP],
+ &curthread->mq[TMQ_ROBUST_PP_PRIV], UMUTEX_CONTESTED);
+ curthread->robust_list = 0;
}
int
@@ -407,17 +482,18 @@ _pthread_mutex_destroy(pthread_mutex_t *
if (m == THR_PSHARED_PTR) {
m1 = __thr_pshared_offpage(mutex, 0);
if (m1 != NULL) {
- mutex_assert_not_owned(m1);
+ mutex_assert_not_owned(_get_curthread(), m1);
__thr_pshared_destroy(mutex);
}
*mutex = THR_MUTEX_DESTROYED;
return (0);
}
- if (m->m_owner != 0) {
+ if (PMUTEX_OWNER_ID(m) != 0 &&
+ (uint32_t)m->m_lock.m_owner != UMUTEX_RB_NOTRECOV) {
ret = EBUSY;
} else {
*mutex = THR_MUTEX_DESTROYED;
- mutex_assert_not_owned(m);
+ mutex_assert_not_owned(_get_curthread(), m);
free(m);
ret = 0;
}
@@ -432,31 +508,81 @@ mutex_qidx(struct pthread_mutex *m)
if ((m->m_lock.m_flags & UMUTEX_PRIO_PROTECT) == 0)
return (TMQ_NORM);
- return (TMQ_NORM_PP);
+ return (is_robust_mutex(m) ? TMQ_ROBUST_PP : TMQ_NORM_PP);
}
+/*
+ * Both enqueue_mutex() and dequeue_mutex() operate on the
+ * thread-private linkage of the locked mutexes and on the robust
+ * linkage.
+ *
+ * Robust list, as seen by kernel, must be consistent even in the case
+ * of thread termination at arbitrary moment. Since either enqueue or
+ * dequeue for list walked by kernel consists of rewriting a single
+ * forward pointer, it is safe. On the other hand, rewrite of the
+ * back pointer is not atomic WRT the forward one, but kernel does not
+ * care.
+ */
static void
-enqueue_mutex(struct pthread *curthread, struct pthread_mutex *m)
+enqueue_mutex(struct pthread *curthread, struct pthread_mutex *m,
+ int error)
{
+ struct pthread_mutex *m1;
+ uintptr_t *rl;
int qidx;
- m->m_owner = TID(curthread);
/* Add to the list of owned mutexes: */
- mutex_assert_not_owned(m);
+ if (error != EOWNERDEAD)
+ mutex_assert_not_owned(curthread, m);
qidx = mutex_qidx(m);
TAILQ_INSERT_TAIL(&curthread->mq[qidx], m, m_qe);
if (!is_pshared_mutex(m))
TAILQ_INSERT_TAIL(&curthread->mq[qidx + 1], m, m_pqe);
+ if (is_robust_mutex(m)) {
+ rl = is_pshared_mutex(m) ? &curthread->robust_list :
+ &curthread->priv_robust_list;
+ m->m_rb_prev = NULL;
+ if (*rl != 0) {
+ m1 = __containerof((void *)*rl,
+ struct pthread_mutex, m_lock);
+ m->m_lock.m_rb_lnk = (uintptr_t)&m1->m_lock;
+ m1->m_rb_prev = m;
+ } else {
+ m1 = NULL;
+ m->m_lock.m_rb_lnk = 0;
+ }
+ *rl = (uintptr_t)&m->m_lock;
+ }
}
static void
dequeue_mutex(struct pthread *curthread, struct pthread_mutex *m)
{
+ struct pthread_mutex *mp, *mn;
int qidx;
- m->m_owner = 0;
mutex_assert_is_owned(m);
qidx = mutex_qidx(m);
+ if (is_robust_mutex(m)) {
+ mp = m->m_rb_prev;
+ if (mp == NULL) {
+ if (is_pshared_mutex(m)) {
+ curthread->robust_list = m->m_lock.m_rb_lnk;
+ } else {
+ curthread->priv_robust_list =
+ m->m_lock.m_rb_lnk;
+ }
+ } else {
+ mp->m_lock.m_rb_lnk = m->m_lock.m_rb_lnk;
+ }
+ if (m->m_lock.m_rb_lnk != 0) {
+ mn = __containerof((void *)m->m_lock.m_rb_lnk,
+ struct pthread_mutex, m_lock);
+ mn->m_rb_prev = m->m_rb_prev;
+ }
+ m->m_lock.m_rb_lnk = 0;
+ m->m_rb_prev = NULL;
+ }
TAILQ_REMOVE(&curthread->mq[qidx], m, m_qe);
if (!is_pshared_mutex(m))
TAILQ_REMOVE(&curthread->mq[qidx + 1], m, m_pqe);
@@ -496,7 +622,7 @@ __pthread_mutex_trylock(pthread_mutex_t
struct pthread *curthread;
struct pthread_mutex *m;
uint32_t id;
- int ret;
+ int ret, robust;
ret = check_and_init_mutex(mutex, &m);
if (ret != 0)
@@ -505,27 +631,32 @@ __pthread_mutex_trylock(pthread_mutex_t
id = TID(curthread);
if (m->m_flags & PMUTEX_FLAG_PRIVATE)
THR_CRITICAL_ENTER(curthread);
+ robust = _mutex_enter_robust(curthread, m);
ret = _thr_umutex_trylock(&m->m_lock, id);
- if (__predict_true(ret == 0)) {
- enqueue_mutex(curthread, m);
- } else if (m->m_owner == id) {
+ if (__predict_true(ret == 0) || ret == EOWNERDEAD) {
+ enqueue_mutex(curthread, m, ret);
+ if (ret == EOWNERDEAD)
+ m->m_lock.m_flags |= UMUTEX_NONCONSISTENT;
+ } else if (PMUTEX_OWNER_ID(m) == id) {
ret = mutex_self_trylock(m);
} /* else {} */
- if (ret && (m->m_flags & PMUTEX_FLAG_PRIVATE))
+ if (robust)
+ _mutex_leave_robust(curthread, m);
+ if ((ret == 0 || ret == EOWNERDEAD) &&
+ (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0)
THR_CRITICAL_LEAVE(curthread);
return (ret);
}
static int
mutex_lock_sleep(struct pthread *curthread, struct pthread_mutex *m,
- const struct timespec *abstime)
+ const struct timespec *abstime)
{
- uint32_t id, owner;
- int count;
- int ret;
+ uint32_t id, owner;
+ int count, ret;
id = TID(curthread);
- if (m->m_owner == id)
+ if (PMUTEX_OWNER_ID(m) == id)
return (mutex_self_lock(m, abstime));
/*
@@ -534,10 +665,9 @@ mutex_lock_sleep(struct pthread *curthre
* the lock is likely to be released quickly and it is
* faster than entering the kernel
*/
- if (__predict_false(
- (m->m_lock.m_flags &
- (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) != 0))
- goto sleep_in_kernel;
+ if (__predict_false((m->m_lock.m_flags & (UMUTEX_PRIO_PROTECT |
+ UMUTEX_PRIO_INHERIT | UMUTEX_ROBUST | UMUTEX_NONCONSISTENT)) != 0))
+ goto sleep_in_kernel;
if (!_thr_is_smp)
goto yield_loop;
@@ -546,7 +676,8 @@ mutex_lock_sleep(struct pthread *curthre
while (count--) {
owner = m->m_lock.m_owner;
if ((owner & ~UMUTEX_CONTESTED) == 0) {
- if (atomic_cmpset_acq_32(&m->m_lock.m_owner, owner, id|owner)) {
+ if (atomic_cmpset_acq_32(&m->m_lock.m_owner, owner,
+ id | owner)) {
ret = 0;
goto done;
}
@@ -560,7 +691,8 @@ yield_loop:
_sched_yield();
owner = m->m_lock.m_owner;
if ((owner & ~UMUTEX_CONTESTED) == 0) {
- if (atomic_cmpset_acq_32(&m->m_lock.m_owner, owner, id|owner)) {
+ if (atomic_cmpset_acq_32(&m->m_lock.m_owner, owner,
+ id | owner)) {
ret = 0;
goto done;
}
@@ -568,38 +700,46 @@ yield_loop:
}
sleep_in_kernel:
- if (abstime == NULL) {
+ if (abstime == NULL)
ret = __thr_umutex_lock(&m->m_lock, id);
- } else if (__predict_false(
- abstime->tv_nsec < 0 ||
- abstime->tv_nsec >= 1000000000)) {
+ else if (__predict_false(abstime->tv_nsec < 0 ||
+ abstime->tv_nsec >= 1000000000))
ret = EINVAL;
- } else {
+ else
ret = __thr_umutex_timedlock(&m->m_lock, id, abstime);
- }
done:
- if (ret == 0)
- enqueue_mutex(curthread, m);
-
+ if (ret == 0 || ret == EOWNERDEAD) {
+ enqueue_mutex(curthread, m, ret);
+ if (ret == EOWNERDEAD)
+ m->m_lock.m_flags |= UMUTEX_NONCONSISTENT;
+ }
return (ret);
}
static inline int
-mutex_lock_common(struct pthread_mutex *m,
- const struct timespec *abstime, int cvattach)
+mutex_lock_common(struct pthread_mutex *m, const struct timespec *abstime,
+ bool cvattach, bool rb_onlist)
{
- struct pthread *curthread = _get_curthread();
- int ret;
+ struct pthread *curthread;
+ int ret, robust;
+ curthread = _get_curthread();
if (!cvattach && m->m_flags & PMUTEX_FLAG_PRIVATE)
THR_CRITICAL_ENTER(curthread);
- if (_thr_umutex_trylock2(&m->m_lock, TID(curthread)) == 0) {
- enqueue_mutex(curthread, m);
- ret = 0;
+ if (!rb_onlist)
+ robust = _mutex_enter_robust(curthread, m);
+ ret = _thr_umutex_trylock2(&m->m_lock, TID(curthread));
+ if (ret == 0 || ret == EOWNERDEAD) {
+ enqueue_mutex(curthread, m, ret);
+ if (ret == EOWNERDEAD)
+ m->m_lock.m_flags |= UMUTEX_NONCONSISTENT;
} else {
ret = mutex_lock_sleep(curthread, m, abstime);
}
- if (ret && (m->m_flags & PMUTEX_FLAG_PRIVATE) && !cvattach)
+ if (!rb_onlist && robust)
+ _mutex_leave_robust(curthread, m);
+ if (ret != 0 && ret != EOWNERDEAD &&
+ (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0 && !cvattach)
THR_CRITICAL_LEAVE(curthread);
return (ret);
}
@@ -613,7 +753,7 @@ __pthread_mutex_lock(pthread_mutex_t *mu
_thr_check_init();
ret = check_and_init_mutex(mutex, &m);
if (ret == 0)
- ret = mutex_lock_common(m, NULL, 0);
+ ret = mutex_lock_common(m, NULL, false, false);
return (ret);
}
@@ -627,7 +767,7 @@ __pthread_mutex_timedlock(pthread_mutex_
_thr_check_init();
ret = check_and_init_mutex(mutex, &m);
if (ret == 0)
- ret = mutex_lock_common(m, abstime, 0);
+ ret = mutex_lock_common(m, abstime, false, false);
return (ret);
}
@@ -644,16 +784,16 @@ _pthread_mutex_unlock(pthread_mutex_t *m
} else {
mp = *mutex;
}
- return (mutex_unlock_common(mp, 0, NULL));
+ return (mutex_unlock_common(mp, false, NULL));
}
int
-_mutex_cv_lock(struct pthread_mutex *m, int count)
+_mutex_cv_lock(struct pthread_mutex *m, int count, bool rb_onlist)
{
- int error;
+ int error;
- error = mutex_lock_common(m, NULL, 1);
- if (error == 0)
+ error = mutex_lock_common(m, NULL, true, rb_onlist);
+ if (error == 0 || error == EOWNERDEAD)
m->m_count = count;
return (error);
}
@@ -667,16 +807,17 @@ _mutex_cv_unlock(struct pthread_mutex *m
*/
*count = m->m_count;
m->m_count = 0;
- (void)mutex_unlock_common(m, 1, defer);
+ (void)mutex_unlock_common(m, true, defer);
return (0);
}
int
_mutex_cv_attach(struct pthread_mutex *m, int count)
{
- struct pthread *curthread = _get_curthread();
+ struct pthread *curthread;
- enqueue_mutex(curthread, m);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list