Deleted Added
full compact
socketvar.h (272823) socketvar.h (274421)
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 272823 2014-10-09 15:16:52Z marcel $
31 * $FreeBSD: head/sys/sys/socketvar.h 274421 2014-11-12 09:57:15Z glebius $
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>

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

203 SB_UPCALL | SB_AIO | SB_KNOTE)) != 0)
204
205/* do we have to send all at once on a socket? */
206#define sosendallatonce(so) \
207 ((so)->so_proto->pr_flags & PR_ATOMIC)
208
209/* can we read something from so? */
210#define soreadabledata(so) \
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>

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

203 SB_UPCALL | SB_AIO | SB_KNOTE)) != 0)
204
205/* do we have to send all at once on a socket? */
206#define sosendallatonce(so) \
207 ((so)->so_proto->pr_flags & PR_ATOMIC)
208
209/* can we read something from so? */
210#define soreadabledata(so) \
211 ((so)->so_rcv.sb_cc >= (so)->so_rcv.sb_lowat || \
211 (sbavail(&(so)->so_rcv) >= (so)->so_rcv.sb_lowat || \
212 !TAILQ_EMPTY(&(so)->so_comp) || (so)->so_error)
213#define soreadable(so) \
214 (soreadabledata(so) || ((so)->so_rcv.sb_state & SBS_CANTRCVMORE))
215
216/* can we write something to so? */
217#define sowriteable(so) \
218 ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
219 (((so)->so_state&SS_ISCONNECTED) || \

--- 199 unchanged lines hidden ---
212 !TAILQ_EMPTY(&(so)->so_comp) || (so)->so_error)
213#define soreadable(so) \
214 (soreadabledata(so) || ((so)->so_rcv.sb_state & SBS_CANTRCVMORE))
215
216/* can we write something to so? */
217#define sowriteable(so) \
218 ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
219 (((so)->so_state&SS_ISCONNECTED) || \

--- 199 unchanged lines hidden ---