Date: Wed, 11 May 2016 11:23:22 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r299429 - in stable/10/cddl/contrib/opensolaris/lib/libzpool/common: . sys Message-ID: <201605111123.u4BBNML4032856@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed May 11 11:23:22 2016 New Revision: 299429 URL: https://svnweb.freebsd.org/changeset/base/299429 Log: MFC r297508: MFV r297505: 6739 userland version of cv_timedwait_hires() always assumes absolute time Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: George Wilson <george.wilson@delphix.com> illumos/illumos-gate@41c6413cb54bf338d7a59ed789ec2e0e44c35e6f Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed May 11 10:50:59 2016 (r299428) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed May 11 11:23:22 2016 (r299429) @@ -366,10 +366,13 @@ cv_timedwait_hires(kcondvar_t *cv, kmute timestruc_t ts; hrtime_t delta; - ASSERT(flag == 0); + ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE); top: - delta = tim - gethrtime(); + delta = tim; + if (flag & CALLOUT_FLAG_ABSOLUTE) + delta -= gethrtime(); + if (delta <= 0) return (-1); Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Wed May 11 10:50:59 2016 (r299428) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Wed May 11 11:23:22 2016 (r299429) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* @@ -324,6 +324,7 @@ extern gid_t *crgetgroups(cred_t *cr); typedef cond_t kcondvar_t; #define CV_DEFAULT USYNC_THREAD +#define CALLOUT_FLAG_ABSOLUTE 0x2 extern void cv_init(kcondvar_t *cv, char *name, int type, void *arg); extern void cv_destroy(kcondvar_t *cv);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605111123.u4BBNML4032856>