diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-02-04 12:25:13 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-02-04 12:25:13 +0000 |
commit | f23198af5c5d671548e3ad76cf9a569dbc55bd0d (patch) | |
tree | 07b631ecc21ddad4957ba8b20d818e81af4c6e1f /sys/kern/uipc_sockbuf.c | |
parent | ce24cd825a8e9934cab77ec673e88f417d5afab1 (diff) | |
download | FreeBSD-src-f23198af5c5d671548e3ad76cf9a569dbc55bd0d.zip FreeBSD-src-f23198af5c5d671548e3ad76cf9a569dbc55bd0d.tar.gz |
Further clean up sorflush:
- Expose sbrelease_internal(), a variant of sbrelease() with no
expectations about the validity of locks in the socket buffer.
- Use sbrelease_internel() in sorflush(), and as a result avoid intializing
and destroying a socket buffer lock for the temporary stack copy of the
actual buffer, asb.
- Add a comment indicating why we do what we do, and remove an XXX since
things have gotten less ugly in sorflush() lately.
This makes socket close cleaner, and possibly also marginally faster.
MFC after: 3 weeks
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r-- | sys/kern/uipc_sockbuf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 16923cf..9e89826 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -67,7 +67,6 @@ static u_long sb_efficiency = 8; /* parameter for sbreserve() */ static void sbdrop_internal(struct sockbuf *sb, int len); static void sbflush_internal(struct sockbuf *sb); -static void sbrelease_internal(struct sockbuf *sb, struct socket *so); /* * Socantsendmore indicates that no more data will be sent on the socket; it @@ -322,7 +321,7 @@ sbreserve(struct sockbuf *sb, u_long cc, struct socket *so, /* * Free mbufs held by a socket, and reserved mbuf space. */ -static void +void sbrelease_internal(struct sockbuf *sb, struct socket *so) { |