1.\" $NetBSD: timeout.9,v 1.2 1996/06/23 22:32:34 pk Exp $ 2.\" 3.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Paul Kranenburg. 8.\" --- 13 unchanged lines hidden (view full) --- 22.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" |
30.\" $FreeBSD: head/share/man/man9/timeout.9 302350 2016-07-05 18:47:17Z glebius $ |
31.\" |
32.Dd July 4, 2016 |
33.Dt TIMEOUT 9 34.Os 35.Sh NAME 36.Nm callout_active , 37.Nm callout_deactivate , 38.Nm callout_async_drain , 39.Nm callout_drain , 40.Nm callout_handle_init , --- 201 unchanged lines hidden (view full) --- 242If the callout is pending and successfully stopped, then 243.Fn callout_stop 244returns a value of one. 245If the callout is not set, or 246has already been serviced, then 247negative one is returned. 248If the callout is currently being serviced and cannot be stopped, 249then zero will be returned. |
250If the callout is currently being serviced and cannot be stopped, and at the 251same time a next invocation of the same callout is also scheduled, then 252.Fn callout_stop 253unschedules the next run and returns zero. |
254If the callout has an associated lock, 255then that lock must be held when this function is called. 256.Pp 257The function 258.Fn callout_async_drain 259is identical to 260.Fn callout_stop 261with one difference. --- 551 unchanged lines hidden (view full) --- 813function invocation was scheduled. 814.Pp 815The 816.Fn callout_stop 817and 818.Fn callout_drain 819functions return a value of one if the callout was still pending when it was 820called, a zero if the callout could not be stopped and a negative one is it |
821was either not running or has already completed. |
822The 823.Fn timeout 824function returns a 825.Ft struct callout_handle 826that can be passed to 827.Fn untimeout . 828.Sh HISTORY 829The current timeout and untimeout routines are based on the work of --- 23 unchanged lines hidden --- |