# kern/kern_timeout.c | 9 ++++++++- # sys/callout.h | 8 ++++---- # 2 files changed, 12 insertions(+), 5 deletions(-) # svn status M sys/kern/kern_timeout.c M sys/sys/callout.h Index: sys/kern/kern_timeout.c =================================================================== --- sys/kern/kern_timeout.c (revision 290801) +++ sys/kern/kern_timeout.c (working copy) @@ -1157,7 +1157,7 @@ callout_schedule(struct callout *c, int } int -_callout_stop_safe(struct callout *c, int safe, void (*drain)(void *)) +_callout_stop_safe_drain(struct callout *c, int safe, void (*drain)(void *)) { struct callout_cpu *cc, *old_cc; struct lock_class *class; @@ -1405,6 +1405,13 @@ again: return (1); } +int +_callout_stop_safe(struct callout *c, int safe) +{ + + return (_callout_stop_safe_drain(c, safe, NULL)); +} + void callout_init(struct callout *c, int mpsafe) { Index: sys/sys/callout.h =================================================================== --- sys/sys/callout.h (revision 290773) +++ sys/sys/callout.h (working copy) @@ -81,7 +81,7 @@ struct callout_handle { */ #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) -#define callout_drain(c) _callout_stop_safe(c, 1, NULL) +#define callout_drain(c) _callout_stop_safe_drain(c, 1, NULL) void callout_init(struct callout *, int); void _callout_init_lock(struct callout *, struct lock_object *, int); #define callout_init_mtx(c, mtx, flags) \ @@ -119,11 +119,11 @@ int callout_schedule(struct callout *, i int callout_schedule_on(struct callout *, int, int); #define callout_schedule_curcpu(c, on_tick) \ callout_schedule_on((c), (on_tick), PCPU_GET(cpuid)) -#define callout_stop(c) _callout_stop_safe(c, 0, NULL) -int _callout_stop_safe(struct callout *, int, void (*)(void *)); +#define callout_stop(c) _callout_stop_safe_drain(c, 0, NULL) +int _callout_stop_safe_drain(struct callout *, int, void (*)(void *)); void callout_process(sbintime_t now); #define callout_async_drain(c, d) \ - _callout_stop_safe(c, 0, d) + _callout_stop_safe_drain(c, 0, d) #endif #endif /* _SYS_CALLOUT_H_ */