panic in arptimer in r289937
Randall Stewart
rrs at netflix.com
Thu Dec 10 15:35:47 UTC 2015
If you did that it would change the KPI a bit meaning lots
of thrashing in the code.
And on top of that you now would no longer return 0..
You would get 1 it was restarted or -1 it was not running but is now started.
Makes no sense to me sorry..
R
On Dec 10, 2015, at 7:35 AM, Hans Petter Selasky <hps at selasky.org> wrote:
> On 12/10/15 16:25, Randall Stewart wrote:
>> For callout_stop/drain you get
>>
>> -1 == Callout as already gone off or is not running (usually the latter) else the caller iks
>> not using locking properly or did not lock and check the active() value (which would have returned not active so no stop
>> would have been needed);
>> 0 == we could not stop the callout, it was in process..
>> 1 == it was stopped successfully
>>
>>
>> For callout_reset() you get
>>
>> 0 == it was started
>> 1 == it was restarted.
>>
>> There is no -1 since it is either started or restarted never left in a not-running state...
>>
>
> Hi,
>
> Correct, though if the return values would be the same, it might simplify the callout API and manual page a bit:
>
> /* return values for all callout_xxx() functions */
> #define CALLOUT_RET_DRAINING 0 /* callout cannot be stopped, need drain */
> #define CALLOUT_RET_CANCELLED 1 /* callout was successfully stopped */
> #define CALLOUT_RET_STOPPED -1 /* callout was already stopped */
>
> Then callout_reset() would return -1, if it was started from the stopped state.
>
> --HPS
--------
Randall Stewart
rrs at netflix.com
803-317-4952
More information about the freebsd-net
mailing list