socketvar.h (249327) | socketvar.h (250300) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)socketvar.h 8.3 (Berkeley) 2/19/95 30 * | 1/*- 2 * Copyright (c) 1982, 1986, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)socketvar.h 8.3 (Berkeley) 2/19/95 30 * |
31 * $FreeBSD: head/sys/sys/socketvar.h 249327 2013-04-10 08:09:25Z glebius $ | 31 * $FreeBSD: head/sys/sys/socketvar.h 250300 2013-05-06 16:42:18Z andre $ |
32 */ 33 34#ifndef _SYS_SOCKETVAR_H_ 35#define _SYS_SOCKETVAR_H_ 36 37#include <sys/queue.h> /* for TAILQ macros */ 38#include <sys/selinfo.h> /* for struct selinfo */ 39#include <sys/_lock.h> --- 88 unchanged lines hidden (view full) --- 128}; 129 130/* 131 * Global accept mutex to serialize access to accept queues and 132 * fields associated with multiple sockets. This allows us to 133 * avoid defining a lock order between listen and accept sockets 134 * until such time as it proves to be a good idea. 135 */ | 32 */ 33 34#ifndef _SYS_SOCKETVAR_H_ 35#define _SYS_SOCKETVAR_H_ 36 37#include <sys/queue.h> /* for TAILQ macros */ 38#include <sys/selinfo.h> /* for struct selinfo */ 39#include <sys/_lock.h> --- 88 unchanged lines hidden (view full) --- 128}; 129 130/* 131 * Global accept mutex to serialize access to accept queues and 132 * fields associated with multiple sockets. This allows us to 133 * avoid defining a lock order between listen and accept sockets 134 * until such time as it proves to be a good idea. 135 */ |
136extern struct mtx_padalign accept_mtx; | 136extern struct mtx accept_mtx; |
137#define ACCEPT_LOCK_ASSERT() mtx_assert(&accept_mtx, MA_OWNED) 138#define ACCEPT_UNLOCK_ASSERT() mtx_assert(&accept_mtx, MA_NOTOWNED) 139#define ACCEPT_LOCK() mtx_lock(&accept_mtx) 140#define ACCEPT_UNLOCK() mtx_unlock(&accept_mtx) 141 142/* 143 * Per-socket mutex: we reuse the receive socket buffer mutex for space 144 * efficiency. This decision should probably be revisited as we optimize --- 246 unchanged lines hidden --- | 137#define ACCEPT_LOCK_ASSERT() mtx_assert(&accept_mtx, MA_OWNED) 138#define ACCEPT_UNLOCK_ASSERT() mtx_assert(&accept_mtx, MA_NOTOWNED) 139#define ACCEPT_LOCK() mtx_lock(&accept_mtx) 140#define ACCEPT_UNLOCK() mtx_unlock(&accept_mtx) 141 142/* 143 * Per-socket mutex: we reuse the receive socket buffer mutex for space 144 * efficiency. This decision should probably be revisited as we optimize --- 246 unchanged lines hidden --- |