From owner-svn-src-head@freebsd.org Wed Jul 4 03:54:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93341029BD2; Wed, 4 Jul 2018 03:54:40 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57D8083316; Wed, 4 Jul 2018 03:54:40 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39E5D259BF; Wed, 4 Jul 2018 03:54:40 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w643seI0012624; Wed, 4 Jul 2018 03:54:40 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w643se1q012623; Wed, 4 Jul 2018 03:54:40 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807040354.w643se1q012623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Wed, 4 Jul 2018 03:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335931 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 335931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2018 03:54:40 -0000 Author: mmacy Date: Wed Jul 4 03:54:39 2018 New Revision: 335931 URL: https://svnweb.freebsd.org/changeset/base/335931 Log: epoch(9): update in_epoch() description as well Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 ============================================================================== --- head/share/man/man9/epoch.9 Wed Jul 4 03:46:23 2018 (r335930) +++ head/share/man/man9/epoch.9 Wed Jul 4 03:54:39 2018 (r335931) @@ -61,7 +61,7 @@ .Ft void .Fn epoch_call "epoch_t epoch" "epoch_context_t ctx" "void (*callback) (epoch_context_t)" .Ft int -.Fn in_epoch "void" +.Fn in_epoch "epoch_t epoch" .Sh DESCRIPTION Epochs are used to guarantee liveness and immutability of data by deferring reclamation and mutation until a grace period has elapsed. @@ -111,7 +111,7 @@ in the middle of an epoch section for the same epoch a Be default mutexes cannot be held across .Fn epoch_wait_preempt . To permit this the epoch must be allocated with -.Fn EPOCH_LOCKED . +EPOCH_LOCKED. When doing this one must be cautious of creating a situation where a deadlock is possible. Note that epochs are not a straight replacement for read locks. Callers must use safe list and tailq traversal routines in an epoch (see ck_queue). @@ -121,8 +121,8 @@ in place. An item to be modified must be handled with copy on write and frees must be deferred until after a grace period has elapsed. .Sh RETURN VALUES -.Fn in_epoch -will return 1 if curthread is in an epoch, 0 otherwise. +.Fn in_epoch curepoch +will return 1 if curthread is in curepoch, 0 otherwise. .Sh CAVEATS One must be cautious when using .Fn epoch_wait_preempt