Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/uipc_socket.c
Show First 20 Lines • Show All 1,516 Lines • ▼ Show 20 Lines | do { | ||||
if ((atomic && resid > so->so_snd.sb_hiwat) || | if ((atomic && resid > so->so_snd.sb_hiwat) || | ||||
clen > so->so_snd.sb_hiwat) { | clen > so->so_snd.sb_hiwat) { | ||||
SOCKBUF_UNLOCK(&so->so_snd); | SOCKBUF_UNLOCK(&so->so_snd); | ||||
error = EMSGSIZE; | error = EMSGSIZE; | ||||
goto release; | goto release; | ||||
} | } | ||||
if (space < resid + clen && | if (space < resid + clen && | ||||
(atomic || space < so->so_snd.sb_lowat || space < clen)) { | (atomic || space < so->so_snd.sb_lowat || space < clen)) { | ||||
if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO)) { | if ((so->so_state & SS_NBIO) || | ||||
(flags & (MSG_NBIO | MSG_DONTWAIT)) != 0) { | |||||
SOCKBUF_UNLOCK(&so->so_snd); | SOCKBUF_UNLOCK(&so->so_snd); | ||||
error = EWOULDBLOCK; | error = EWOULDBLOCK; | ||||
goto release; | goto release; | ||||
} | } | ||||
error = sbwait(&so->so_snd); | error = sbwait(&so->so_snd); | ||||
SOCKBUF_UNLOCK(&so->so_snd); | SOCKBUF_UNLOCK(&so->so_snd); | ||||
if (error) | if (error) | ||||
goto release; | goto release; | ||||
▲ Show 20 Lines • Show All 2,629 Lines • Show Last 20 Lines |