+This function is deprecated and cancels the timeout associated with the
+.Fa handle
+argument using the function pointed to by the
.Fa func
-and
+argument and having the
.Fa arg
-arguments from the previous callout.
-Note that one of the
-.Fn callout_reset
-functions must always be called to initialize
+arguments to validate the handle.
+If the handle does not correspond to a timeout with
+the function
.Fa func
-and
+taking the argument
.Fa arg
-before one of the
-.Fn callout_schedule
-functions can be used.
+no action is taken. The
+.Fa handle
+must be initialized by a previous call to
+.Fn timeout ,
+.Fn callout_handle_init
+or assigned the value of
+.Fn CALLOUT_HANDLE_INITIALIZER "&handle"
+before being passed to
+.Fn untimeout .
+The behavior of calling
+.Fn untimeout
+with an uninitialized handle
+is undefined.
.Pp
-The callout subsystem provides a softclock thread for each CPU in the system.
-Callouts are assigned to a single CPU and are executed by the softclock thread
-for that CPU.
-Initially,
-callouts are assigned to CPU 0.
-The
-.Fn callout_reset_on ,
-.Fn callout_reset_sbt_on ,
-.Fn callout_schedule_on
-and
-.Fn callout_schedule_sbt_on
-functions assign the callout to CPU
-.Fa cpu .
-The
-.Fn callout_reset_curcpu ,
-.Fn callout_reset_sbt_curpu ,
-.Fn callout_schedule_curcpu
-and
-.Fn callout_schedule_sbt_curcpu
-functions assign the callout to the current CPU.
-The
-.Fn callout_reset ,
-.Fn callout_reset_sbt ,
-.Fn callout_schedule
-and
-.Fn callout_schedule_sbt
-functions schedule the callout to execute in the softclock thread of the CPU
-to which it is currently assigned.
+.Ft int
+.Fn callout_stop "struct callout *c"
+This function is used to stop a timeout function invocation associated with the callout pointed to by the
+.Fa c
+argument, in a non-blocking fashion.
+This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialized.
+This function returns a non-zero value if the given callout was pending and
+the callback function was prevented from being called.
+Else a value of zero is returned.
+If a lock is associated with the callout given by the
+.Fa c
+argument and it is exclusivly locked when this function is called, the
+.Fn callout_stop
+function will always ensure that the callback function is never reached.
+In other words the callout will be atomically stopped.
+Else there is no such guarantee.
+.Sh DRAINING CALLOUTS
+.Ft int
+.Fn callout_drain "struct callout *c"
+This function works the same like the
+.Fn callout_stop
+function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the
+.Fa c
+argument inside the callout subsystem before it returns.
+Also this function ensures that the lock, if any, associated with the
+callout is no longer being used.
+When this function returns, it is safe to free the callout structure pointed to by the
+This function is deprecated and cancels the timeout associated with the
+.Fa handle
+argument using the function pointed to by the
.Fa func
-and
+argument and having the
.Fa arg
-arguments from the previous callout.
-Note that one of the
-.Fn callout_reset
-functions must always be called to initialize
+arguments to validate the handle.
+If the handle does not correspond to a timeout with
+the function
.Fa func
-and
+taking the argument
.Fa arg
-before one of the
-.Fn callout_schedule
-functions can be used.
+no action is taken. The
+.Fa handle
+must be initialized by a previous call to
+.Fn timeout ,
+.Fn callout_handle_init
+or assigned the value of
+.Fn CALLOUT_HANDLE_INITIALIZER "&handle"
+before being passed to
+.Fn untimeout .
+The behavior of calling
+.Fn untimeout
+with an uninitialized handle
+is undefined.
.Pp
-The callout subsystem provides a softclock thread for each CPU in the system.
-Callouts are assigned to a single CPU and are executed by the softclock thread
-for that CPU.
-Initially,
-callouts are assigned to CPU 0.
-The
-.Fn callout_reset_on ,
-.Fn callout_reset_sbt_on ,
-.Fn callout_schedule_on
-and
-.Fn callout_schedule_sbt_on
-functions assign the callout to CPU
-.Fa cpu .
-The
-.Fn callout_reset_curcpu ,
-.Fn callout_reset_sbt_curpu ,
-.Fn callout_schedule_curcpu
-and
-.Fn callout_schedule_sbt_curcpu
-functions assign the callout to the current CPU.
-The
-.Fn callout_reset ,
-.Fn callout_reset_sbt ,
-.Fn callout_schedule
-and
-.Fn callout_schedule_sbt
-functions schedule the callout to execute in the softclock thread of the CPU
-to which it is currently assigned.
+.Ft int
+.Fn callout_stop "struct callout *c"
+This function is used to stop a timeout function invocation associated with the callout pointed to by the
+.Fa c
+argument, in a non-blocking fashion.
+This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialized.
+This function returns a non-zero value if the given callout was pending and
+the callback function was prevented from being called.
+Else a value of zero is returned.
+If a lock is associated with the callout given by the
+.Fa c
+argument and it is exclusivly locked when this function is called, the
+.Fn callout_stop
+function will always ensure that the callback function is never reached.
+In other words the callout will be atomically stopped.
+Else there is no such guarantee.
+.Sh DRAINING CALLOUTS
+.Ft int
+.Fn callout_drain "struct callout *c"
+This function works the same like the
+.Fn callout_stop
+function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the
+.Fa c
+argument inside the callout subsystem before it returns.
+Also this function ensures that the lock, if any, associated with the
+callout is no longer being used.
+When this function returns, it is safe to free the callout structure pointed to by the