Date: Tue, 16 Dec 2003 15:32:03 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 43987 for review Message-ID: <200312162332.hBGNW384045901@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=43987 Change 43987 by sam@sam_ebb on 2003/12/16 15:31:05 o correct exit case in soreceive to unlock the socket buffer o don't sbunlock in soreceive when restarting when no data has been transferred (note this is correct as previously we unlocked the sockbuf whenever we blocked but now we keep the sockbuf locked for the duration of a receive which means receives on a socket are single-threaded) Affected files ... .. //depot/projects/netperf+sockets/sys/kern/uipc_socket.c#6 edit Differences ... ==== //depot/projects/netperf+sockets/sys/kern/uipc_socket.c#6 (text+ko) ==== @@ -889,7 +889,7 @@ SBLASTMBUFCHK(&so->so_rcv); error = sbwait(&so->so_rcv); if (error) - goto out; + goto release; goto restart; } dontblock: @@ -1131,10 +1131,8 @@ (*pr->pr_usrreqs->pru_rcvd)(so, flags); } if (orig_resid == uio->uio_resid && orig_resid && - (flags & MSG_EOR) == 0 && (so->so_state & SS_CANTRCVMORE) == 0) { - sbunlock(&so->so_rcv); + (flags & MSG_EOR) == 0 && (so->so_state & SS_CANTRCVMORE) == 0) goto restart; - } if (flagsp) *flagsp |= flags;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312162332.hBGNW384045901>