Deleted Added
full compact
uipc_socket.c (250102) uipc_socket.c (250300)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2004 The FreeBSD Foundation
5 * Copyright (c) 2004-2008 Robert N. M. Watson
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

96 * NOTE: With regard to VNETs the general rule is that callers do not set
97 * curvnet. Exceptions to this rule include soabort(), sodisconnect(),
98 * sofree() (and with that sorele(), sotryfree()), as well as sonewconn()
99 * and sorflush(), which are usually called from a pre-set VNET context.
100 * sopoll() currently does not need a VNET context to be set.
101 */
102
103#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2004 The FreeBSD Foundation
5 * Copyright (c) 2004-2008 Robert N. M. Watson
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

96 * NOTE: With regard to VNETs the general rule is that callers do not set
97 * curvnet. Exceptions to this rule include soabort(), sodisconnect(),
98 * sofree() (and with that sorele(), sotryfree()), as well as sonewconn()
99 * and sorflush(), which are usually called from a pre-set VNET context.
100 * sopoll() currently does not need a VNET context to be set.
101 */
102
103#include <sys/cdefs.h>
104__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 250102 2013-04-30 15:06:30Z jilles $");
104__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 250300 2013-05-06 16:42:18Z andre $");
105
106#include "opt_inet.h"
107#include "opt_inet6.h"
108#include "opt_zero.h"
109#include "opt_compat.h"
110
111#include <sys/param.h>
112#include <sys/systm.h>

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

235 &so_zero_copy_send, 0, "Enable zero copy send");
236#endif /* SOCKET_SEND_COW */
237#endif /* SOCKET_SEND_COW || SOCKET_RECV_PFLIP */
238
239/*
240 * accept_mtx locks down per-socket fields relating to accept queues. See
241 * socketvar.h for an annotation of the protected fields of struct socket.
242 */
105
106#include "opt_inet.h"
107#include "opt_inet6.h"
108#include "opt_zero.h"
109#include "opt_compat.h"
110
111#include <sys/param.h>
112#include <sys/systm.h>

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

235 &so_zero_copy_send, 0, "Enable zero copy send");
236#endif /* SOCKET_SEND_COW */
237#endif /* SOCKET_SEND_COW || SOCKET_RECV_PFLIP */
238
239/*
240 * accept_mtx locks down per-socket fields relating to accept queues. See
241 * socketvar.h for an annotation of the protected fields of struct socket.
242 */
243struct mtx_padalign accept_mtx;
243struct mtx accept_mtx;
244MTX_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF);
245
246/*
247 * so_global_mtx protects so_gencnt, numopensockets, and the per-socket
248 * so_gencnt field.
249 */
244MTX_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF);
245
246/*
247 * so_global_mtx protects so_gencnt, numopensockets, and the per-socket
248 * so_gencnt field.
249 */
250static struct mtx_padalign so_global_mtx;
250static struct mtx so_global_mtx;
251MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF);
252
253/*
254 * General IPC sysctl name space, used by sockets and a variety of other IPC
255 * types.
256 */
257SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLAG_RW, 0, "IPC");
258

--- 3505 unchanged lines hidden ---
251MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF);
252
253/*
254 * General IPC sysctl name space, used by sockets and a variety of other IPC
255 * types.
256 */
257SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLAG_RW, 0, "IPC");
258

--- 3505 unchanged lines hidden ---