tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: m_get_rcvif and symmetry
On 02/03, Ryota Ozaki wrote:
> During fixing the usages I remember what I wanted to achieve by the API
> and found what I should fix is m_get_rcvif, not m_put_rcvif.
>
> The change is below. By the change, a caller must call m_put_rcvif only if
> a returned rcvif is non-NULL. If rcvif is NULL, a caller don't need to call
> it while a caller can call it safely. So codes of callers sometimes can be
> simplified. And the behavior is the same as other APIs such as
> m_get_rcvif_psref/m_put_rcvif_psref and if_get/if_put.
Just a few English grammar suggestions for the comment:
> --- a/sys/sys/mbuf.h
> +++ b/sys/sys/mbuf.h
> @@ -1006,16 +1006,23 @@ void m_print(const struct mbuf *, const char
> *, void (*)(const char *, ...)
> /*
> * Get rcvif of a mbuf.
> *
> - * The caller must call m_put_rcvif after using rcvif. The caller cannot
> - * block or sleep during using rcvif. Insofar as the constraint is satisfied,
> - * the API ensures a got rcvif isn't be freed until m_put_rcvif is called.
> + * The caller must call m_put_rcvif after using rcvif if the returned rcvif
> + * isn't NULL. If the return rcvif is NULL, the caller doesn't need to call
s/return/returned/
> + * m_put_rcvif (calling it is safe). The caller cannot block or sleep during
s/calling it is safe/although calling it is safe/
s/during/while/
> + * using rcvif. Insofar as the constraint is satisfied, the API ensures a got
s/Insofar as the constraint is satisfied, t/T/
s/got/returned/
> + * rcvif isn't be freed until m_put_rcvif is called.
s/be//
Regards,
Lewis
Home |
Main Index |
Thread Index |
Old Index