* in_pcbref() bumps the reference count on an inpcb in order to maintain * stability of an inpcb pointer despite the inpcb lock being released. This * is used in TCP when the inpcbinfo lock needs to be acquired or upgraded, * but where the inpcb lock may already held, or when acquiring a reference * via a pcbgroup. * * in_pcbref() should be used only to provide brief memory stability, and
| 1650 | * using in_pcbrele(). |
| 1651 | */ |
| 1652 | void |
| 1653 | in_pcbref(struct inpcb *inp) |
| 1654 | { |
| 1655 | |
| 1656 | KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); |
| 1657 | |
| 1658 | refcount_acquire(&inp->inp_refcount); |
| 1659 | } |
| 1660 | |
| 1661 | /* |
| 1662 | * Drop a refcount on an inpcb elevated using in_pcbref(); because a call to |
no test coverage detected