Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace deprecated timeout code with callout.
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b17900b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want a callout_drain in MOD_UNLOAD to ensure the callout is not pending or racing with the unload.
I think the reset_debug_log_armed variable probably shouldn't exist with how callouts work in FreeBSD. Instead, you should probably just always call callout_stop() in cancel_reset_debug_log() (it's safe to call callout_stop() on a callout that isn't active). The callout_reset can also probably be unconditional, or at least you can have it do something like:
I doubt that the race of duplicate scheduling of the callout matters for a debug log facility.
b17900b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks for the help!