Randall, On Fri, Nov 13, 2015 at 10:51:36PM +0000, Randall Stewart wrote: R> Author: rrs R> Date: Fri Nov 13 22:51:35 2015 R> New Revision: 290805 R> URL: https://svnweb.freebsd.org/changeset/base/290805 R> R> Log: R> This fixes several places where callout_stops return is examined. The R> new return codes of -1 were mistakenly being considered "true". Callout_stop R> now returns -1 to indicate the callout had either already completed or R> was not running and 0 to indicate it could not be stopped. Also update R> the manual page to make it more consistent no non-zero in the callout_stop R> or callout_reset descriptions.
What about making callout_stop() return value a enum? enum { NOTRUN = 1, COMPLETED, RUNNING, PENDING, }; Will make code more comprehendable, than now: pending = !!(callout_stop(&timeout_task->c) > 0); will be pending = callout_stop(&timeout_task->c) >= RUNNING; -- Totus tuus, Glebius. _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"