Deleted Added
sdiff udiff text old ( 180305 ) new ( 180385 )
full compact
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
31 * $FreeBSD: head/sys/net/raw_cb.c 180385 2008-07-09 15:48:16Z rwatson $
32 */
33
34#include <sys/param.h>
35#include <sys/domain.h>
36#include <sys/lock.h>
37#include <sys/malloc.h>
38#include <sys/mutex.h>
39#include <sys/protosw.h>

--- 56 unchanged lines hidden (view full) ---

96 struct socket *so = rp->rcb_socket;
97
98 KASSERT(so->so_pcb == rp, ("raw_detach: so_pcb != rp"));
99
100 so->so_pcb = NULL;
101 mtx_lock(&rawcb_mtx);
102 LIST_REMOVE(rp, list);
103 mtx_unlock(&rawcb_mtx);
104 free((caddr_t)(rp), M_PCB);
105}