PERFORCE change 43698 for review
Sam Leffler
sam at FreeBSD.org
Tue Dec 9 15:09:37 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=43698
Change 43698 by sam at sam_ebb on 2003/12/09 15:08:41
o remove Giant assertions
o lock snd sockbuf to satisfy assertions
Affected files ...
.. //depot/projects/netperf+sockets/sys/rpc/rpcclnt.c#2 edit
Differences ...
==== //depot/projects/netperf+sockets/sys/rpc/rpcclnt.c#2 (text+ko) ====
@@ -362,8 +362,6 @@
RPC_RETURN(EFAULT);
}
- GIANT_REQUIRED; /* XXX until socket locking done */
-
/* create the socket */
rpc->rc_so = NULL;
@@ -620,8 +618,6 @@
{
struct socket *so;
- GIANT_REQUIRED; /* XXX until socket locking done */
-
if (rpc->rc_so) {
so = rpc->rc_so;
rpc->rc_so = NULL;
@@ -671,8 +667,6 @@
#endif
int error, soflags, flags;
- GIANT_REQUIRED; /* XXX until socket locking done */
-
if (rep) {
if (rep->r_flags & R_SOFTTERM) {
m_freem(top);
@@ -756,8 +750,6 @@
#endif
int error, sotype, rcvflg;
- GIANT_REQUIRED; /* XXX until socket locking done */
-
/*
* Set up arguments for soreceive()
*/
@@ -1430,6 +1422,7 @@
* Set r_rtt to -1 in case we fail to send it now.
*/
rep->r_rtt = -1;
+ SOCKBUF_LOCK(&so->so_snd);
if (sbspace(&so->so_snd) >= rep->r_mreq->m_pkthdr.len &&
((rpc->rc_flag & RPCCLNT_DUMBTIMR) ||
(rep->r_flags & R_SENT) ||
@@ -1464,6 +1457,7 @@
rep->r_rtt = 0;
}
}
+ SOCKBUF_UNLOCK(&so->so_snd);
}
splx(s);
More information about the p4-projects
mailing list