From 4619bce883aa504ef14c9db5419473cb20c8d1d8 Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Wed, 4 Jul 2018 03:54:39 +0000 Subject: [PATCH] epoch(9): update in_epoch() description as well --- share/man/man9/epoch.9 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index e8ea339a422d..ceaa955d615e 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -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 as this will lead to a dead 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