From 8e446974e7a5dfa117231200d595a749e9038fc0 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 8 Feb 2014 08:37:04 +0100 Subject: [PATCH] callout.9: Mention callout_stop_sync(). --- share/man/man9/Makefile | 1 + share/man/man9/callout.9 | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 4bb5796886..e54919f980 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -377,6 +377,7 @@ MLINKS+=callout.9 callout_active.9 \ callout.9 callout_pending.9 \ callout.9 callout_reset.9 \ callout.9 callout_stop.9 \ + callout.9 callout_stop_sync.9 \ callout.9 timeout.9 \ callout.9 untimeout.9 MLINKS+=condvar.9 cv_broadcast.9 \ diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9 index 88191d1c03..72bea02d57 100644 --- a/share/man/man9/callout.9 +++ b/share/man/man9/callout.9 @@ -35,9 +35,8 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/timeout.9,v 1.9.2.6 2001/12/17 11:30:19 ru Exp $ -.\" $DragonFly: src/share/man/man9/callout.9,v 1.6 2008/05/02 02:05:06 swildner Exp $ .\" -.Dd November 14, 2007 +.Dd February 8, 2014 .Dt CALLOUT 9 .Os .Sh NAME @@ -45,6 +44,7 @@ .Nm callout_init_mp , .Nm callout_reset , .Nm callout_stop , +.Nm callout_stop_sync , .Nm callout_active , .Nm callout_pending , .Nm callout_deactivate @@ -63,6 +63,8 @@ typedef void timeout_t (void *); .Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" .Ft int .Fn callout_stop "struct callout *c" +.Ft void +.Fn callout_stop_sync "struct callout *c" .Ft int .Fn callout_active "struct callout *c" .Ft int @@ -125,6 +127,12 @@ It is safe to call on a callout that is not pending, so long as it is initialized. If the callout is not set, has already been serviced or is currently being serviced, then zero will be returned. +The +.Fn callout_stop_sync +function is a synchronous version of +.Fn callout_stop +which ensures that the callout function has completed operation (if it +was running) before returning. .Pp The .Fn callout_pending -- 2.41.0