svn commit: r335929 - head/share/man/man9

Matt Macy mmacy at FreeBSD.org
Wed Jul 4 03:44:37 UTC 2018


Author: mmacy
Date: Wed Jul  4 03:44:36 2018
New Revision: 335929
URL: https://svnweb.freebsd.org/changeset/base/335929

Log:
  epoch(9): update man page for r335924

Modified:
  head/share/man/man9/epoch.9

Modified: head/share/man/man9/epoch.9
==============================================================================
--- head/share/man/man9/epoch.9	Wed Jul  4 03:36:46 2018	(r335928)
+++ head/share/man/man9/epoch.9	Wed Jul  4 03:44:36 2018	(r335929)
@@ -49,11 +49,11 @@
 .Ft void
 .Fn epoch_enter "epoch_t epoch"
 .Ft void
-.Fn epoch_enter_preempt "epoch_t epoch"
+.Fn epoch_enter_preempt "epoch_t epoch" "epoch_tracker_t et"
 .Ft void
 .Fn epoch_exit "epoch_t epoch"
 .Ft void
-.Fn epoch_exit_preempt "epoch_t epoch"
+.Fn epoch_exit_preempt "epoch_t epoch" "epoch_tracker_t et"
 .Ft void
 .Fn epoch_wait "epoch_t epoch"
 .Ft void
@@ -104,12 +104,16 @@ INVARIANTS can assert that a thread is in an epoch by 
 .Fn in_epoch .
 .Pp
 The epoch API currently does not support sleeping in epoch_preempt sections.
-A caller cannot do epoch_enter recursively on different preemptible epochs.
 A caller should never call
 .Fn epoch_wait
-in the middle of an epoch section as this will lead to a deadlock.
+in the middle of an epoch section for the same epoch as this will lead to a deadlock.
 .Pp
-Note that epochs are not a straight replacement for read locks.
+Be default mutexes cannot be held across
+.Fn epoch_wait_preempt .
+To permit this the epoch must be allocated with
+.Fn 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).
 When modifying a list referenced from an epoch section safe removal
 routines must be used and the caller can no longer modify a list entry


More information about the svn-src-head mailing list