diff options
author | glebius <glebius@FreeBSD.org> | 2005-09-08 14:20:39 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-09-08 14:20:39 +0000 |
commit | 8f3eb2a42516bd9997f65e3756ab112b9c4d1f77 (patch) | |
tree | 28d972cf1fcd2514ba5a8b5fca4778e5e77c5548 /share | |
parent | 28cd9f962898edb79beaf6cde6cdd90a29cbc061 (diff) | |
download | FreeBSD-src-8f3eb2a42516bd9997f65e3756ab112b9c4d1f77.zip FreeBSD-src-8f3eb2a42516bd9997f65e3756ab112b9c4d1f77.tar.gz |
Make callout_reset() return a non-zero value if a pending callout
was rescheduled. If there was no pending callout, then return 0.
Reviewed by: iedowse, cperciva
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/timeout.9 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/share/man/man9/timeout.9 b/share/man/man9/timeout.9 index 1589aed..d683e32 100644 --- a/share/man/man9/timeout.9 +++ b/share/man/man9/timeout.9 @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2005 +.Dd September 8, 2005 .Dt TIMEOUT 9 .Os .Sh NAME @@ -77,7 +77,7 @@ struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle) .Fn callout_stop "struct callout *c" .Ft int .Fn callout_drain "struct callout *c" -.Ft void +.Ft int .Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" .Ft int .Fn callout_pending "struct callout *c" @@ -260,6 +260,9 @@ first performs the equivalent of to disestablish the callout, and then establishes a new callout in the same manner as .Fn timeout . +If there was already a pending callout and it was rescheduled, then +.Fn callout_reset +will return a non-zero value. If the callout has an associated mutex, then that mutex must be held when this function is called. .Pp @@ -346,6 +349,8 @@ before destroying the callout or its associated mutex. .It The return value from .Fn callout_stop +and +.Fn callout_reset indicates whether or not the callout was removed. If it is known that the callout was set and the callout function has not yet executed, then a return value of @@ -366,9 +371,6 @@ if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { } .Ed .Pp -Note that there is no equivalent mechanism to determine whether or not -.Fn callout_reset -stopped the callout. .It The .Fn callout_pending , |