Augustin Cavalier 70b4d59f18 freebsd_network: Refactor callout_stop and functions which invoke it.
* Create an internal variant which accepts a "bool locked" parameter.
   Use this from callout_reset instead of invoking it before locking,
   and then relocking afterwards. Eliminates some possible (though,
   so far as I know, benign) races.

 * mtx_assert always, even if the callout is not active. (Requirement
   notated in the comment.)

 * In callout_reset, do not invoke callout_stop at all unless we are
   cancelling; in cases of mere reschedules, simply change c_due
   and notify the callout thread.

 * While at it, use list_init_etc in init_callout; no-op change,
   but keeps things clean.

This should fix #18338 (specifically the change to never invoke
callout_stop when merely rescheduling, not cancelling.)
2023-04-01 00:51:22 -04:00
..
2023-02-17 16:16:39 +00:00
2023-02-10 18:00:44 +00:00
2020-11-02 07:20:28 +00:00
2021-08-30 18:50:46 -04:00
2021-10-22 16:43:01 -04:00