diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-12-23 01:07:12 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-12-23 01:07:12 +0000 |
commit | 5728709bda70f4ee28c63807da07323e0b7e8ff0 (patch) | |
tree | b2f7341a785e2f4bf2833bdf172d91b48c33809c /sys/kern/uipc_socket.c | |
parent | fd297e39399daf77085922d0d9251b4d460e9d6f (diff) | |
download | FreeBSD-src-5728709bda70f4ee28c63807da07323e0b7e8ff0.zip FreeBSD-src-5728709bda70f4ee28c63807da07323e0b7e8ff0.tar.gz |
Remove an XXXRW indicating atomic operations might be used as a
substitute for a global mutex protecting the socket count and
generation number.
The observation that soreceive_rcvoob() can't return an mbuf
chain is a property, not a bug, so remove the XXXRW.
In sorflush, s/existing/previous/ for code when describing prior
behavior.
For SO_LINGER socket option retrieval, remove an XXXRW about why
we hold the mutex: this is correct and not dubious.
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 97d1f63..4b9087c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -121,9 +121,6 @@ MTX_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF); /* * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. - * - * XXXRW: These variables might be better manipulated using atomic operations - * for improved efficiency. */ static struct mtx so_global_mtx; MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); @@ -852,8 +849,8 @@ out: * data from a socket. For more complete comments, see soreceive(), from * which this code originated. * - * XXXRW: Note that soreceive_rcvoob(), unlike the remainder of soreiceve(), - * is unable to return an mbuf chain to the caller. + * Note that soreceive_rcvoob(), unlike the remainder of soreiceve(), is + * unable to return an mbuf chain to the caller. */ static int soreceive_rcvoob(so, uio, flags) @@ -1420,8 +1417,8 @@ sorflush(so) struct sockbuf asb; /* - * XXXRW: This is quite ugly. The existing code made a copy of the - * socket buffer, then zero'd the original to clear the buffer + * XXXRW: This is quite ugly. Previously, this code made a copy of + * the socket buffer, then zero'd the original to clear the buffer * fields. However, with mutexes in the socket buffer, this causes * problems. We only clear the zeroable bits of the original; * however, we have to initialize and destroy the mutex in the copy @@ -1877,11 +1874,6 @@ sogetopt(so, sopt) #endif case SO_LINGER: - /* - * XXXRW: We grab the lock here to get a consistent - * snapshot of both fields. This may not really - * be necessary. - */ SOCK_LOCK(so); l.l_onoff = so->so_options & SO_LINGER; l.l_linger = so->so_linger; |