From bd7f390628a2c8795cf7aa41a7af793e8024907d Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 30 Nov 2014 19:57:53 +0100 Subject: [PATCH] callout.9: Adjust for recent callout code changes. --- share/man/man9/Makefile | 2 ++ share/man/man9/callout.9 | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 909230d8a9..869b14aeef 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -371,10 +371,12 @@ MLINKS+=byteorder.9 be16dec.9 \ MLINKS+=callout.9 callout_active.9 \ callout.9 callout_deactivate.9 \ callout.9 callout_init.9 \ + callout.9 callout_init_lk.9 \ callout.9 callout_init_mp.9 \ callout.9 callout_pending.9 \ callout.9 callout_reset.9 \ callout.9 callout_stop.9 \ + callout.9 callout_stop_async.9 \ callout.9 callout_stop_sync.9 \ callout.9 timeout.9 \ callout.9 untimeout.9 diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9 index 72bea02d57..533134ea0c 100644 --- a/share/man/man9/callout.9 +++ b/share/man/man9/callout.9 @@ -36,14 +36,16 @@ .\" .\" $FreeBSD: src/share/man/man9/timeout.9,v 1.9.2.6 2001/12/17 11:30:19 ru Exp $ .\" -.Dd February 8, 2014 +.Dd November 30, 2014 .Dt CALLOUT 9 .Os .Sh NAME .Nm callout_init , +.Nm callout_init_lk , .Nm callout_init_mp , .Nm callout_reset , .Nm callout_stop , +.Nm callout_stop_async , .Nm callout_stop_sync , .Nm callout_active , .Nm callout_pending , @@ -58,12 +60,16 @@ typedef void timeout_t (void *); .Ft void .Fn callout_init "struct callout *c" .Ft void +.Fn callout_init_lk "struct callout *c" "struct lock *lk" +.Ft void .Fn callout_init_mp "struct callout *c" .Ft 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_async "struct callout *c" +.Ft int .Fn callout_stop_sync "struct callout *c" .Ft int .Fn callout_active "struct callout *c" @@ -107,6 +113,17 @@ requires that the callback function installed by be MP safe. .Pp The +.Fn callout_init_lk +function associates the callout handle +.Fa c +with a lock specified by +.Fa lk . +The +.Nm callout +subsystem acquires the associated lock before calling the callout function +and releases it after the function returns. +.Pp +The .Fn callout_reset function resets and starts the timer associated with the callout handle .Fa c . @@ -128,6 +145,12 @@ 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_async +function is identical to +.Fn callout_stop +without a return value. +.Pp +The .Fn callout_stop_sync function is a synchronous version of .Fn callout_stop -- 2.41.0