Deleted Added
full compact
34c34
< * $FreeBSD: head/sys/netinet/igmp.c 128019 2004-04-07 20:46:16Z imp $
---
> * $FreeBSD: head/sys/netinet/igmp.c 130333 2004-06-11 03:42:37Z rwatson $
82a83,90
> /*
> * igmp_mtx protects all mutable global variables in igmp.c, as well as
> * the data fields in struct router_info. In general, a router_info
> * structure will be valid as long as the referencing struct in_multi is
> * valid, so no reference counting is used. We allow unlocked reads of
> * router_info data when accessed via an in_multi read-only.
> */
> static struct mtx igmp_mtx;
84a93,98
>
> /*
> * XXXRW: can we define these such that these can be made const? In any
> * case, these shouldn't be changed after igmp_init() and therefore don't
> * need locking.
> */
86a101
>
120a136
> mtx_init(&igmp_mtx, "igmp_mtx", NULL, MTX_DEF);
128a145
> mtx_assert(&igmp_mtx, MA_OWNED);
136a154,156
> /*
> * XXXRW: return value of malloc not checked, despite M_NOWAIT.
> */
200d219
< rti = find_rti(ifp);
226a246,247
> mtx_lock(&igmp_mtx);
> rti = find_rti(ifp);
228a250
> mtx_unlock(&igmp_mtx);
346a369
> mtx_lock(&igmp_mtx);
347a371
> mtx_unlock(&igmp_mtx);
406a431
> mtx_lock(&igmp_mtx);
413a439
> mtx_unlock(&igmp_mtx);