Date: Sat, 2 Aug 2008 17:16:02 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 146468 for review Message-ID: <200808021716.m72HG2Mb052505@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146468 Change 146468 by sam@sam_ebb on 2008/08/02 17:15:57 document callout_schedule Affected files ... .. //depot/projects/vap/share/man/man9/timeout.9#3 edit Differences ... ==== //depot/projects/vap/share/man/man9/timeout.9#3 (text+ko) ==== @@ -36,7 +36,7 @@ .\" .\" $FreeBSD: src/share/man/man9/timeout.9,v 1.32 2007/11/20 12:21:36 gabor Exp $ .\" -.Dd November 20, 2007 +.Dd August 2, 2008 .Dt TIMEOUT 9 .Os .Sh NAME @@ -49,6 +49,7 @@ .Nm callout_stop , .Nm callout_drain , .Nm callout_reset , +.Nm callout_schedule , .Nm callout_pending , .Nm callout_active , .Nm callout_deactivate @@ -83,6 +84,8 @@ .Ft int .Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" .Ft int +.Fn callout_schedule "struct callout *c" "int ticks" +.Ft int .Fn callout_pending "struct callout *c" .Ft int .Fn callout_active "struct callout *c" @@ -191,9 +194,10 @@ .Fn callout_init_mtx , .Fn callout_init_rw , .Fn callout_stop , -.Fn callout_drain +.Fn callout_drain , +.Fn callout_reset and -.Fn callout_reset +.Fn callout_schedule are low-level routines for clients who wish to allocate their own callout structures. .Pp @@ -201,9 +205,10 @@ .Fn callout_init initializes a callout so it can be passed to .Fn callout_stop , -.Fn callout_drain +.Fn callout_drain , +.Fn callout_reset or -.Fn callout_reset +.Fn callout_schedule without any side effects. If the .Fa mpsafe @@ -294,6 +299,17 @@ will return a non-zero value. If the callout has an associated mutex, then that mutex must be held when this function is called. +The function +.Fn callout_schedule +(re)schedules an existing callout for a new period of time; it is +equivalent to calling +.Fn callout_reset +with the +.Fa func +and +.Fa arg +parameters extracted from the callout structure (though possibly with +lower overhead). .Pp The macros .Fn callout_pending ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808021716.m72HG2Mb052505>