diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-10-07 09:51:39 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-10-07 09:51:39 +0000 |
commit | 73c76af492803e3906bcb1efa39a6e130931b030 (patch) | |
tree | fd9224d4ff92f262a49e2532e69bce9ebb7c7274 /sys/kern/uipc_sockbuf.c | |
parent | a3e19e89bb67baa445c9522968d83c870592f61c (diff) | |
download | FreeBSD-src-73c76af492803e3906bcb1efa39a6e130931b030.zip FreeBSD-src-73c76af492803e3906bcb1efa39a6e130931b030.tar.gz |
Rewrite sbreserve_locked()'s comment on NULL thread pointers, eliminating
an XXXRW about the comment being stale.
MFC after: 3 days
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r-- | sys/kern/uipc_sockbuf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 41f5987..ab5d150 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -284,10 +284,11 @@ sbreserve_locked(struct sockbuf *sb, u_long cc, struct socket *so, SOCKBUF_LOCK_ASSERT(sb); /* - * td will only be NULL when we're in an interrupt (e.g. in - * tcp_input()). - * - * XXXRW: This comment needs updating, as might the code. + * When a thread is passed, we take into account the thread's socket + * buffer size limit. The caller will generally pass curthread, but + * in the TCP input path, NULL will be passed to indicate that no + * appropriate thread resource limits are available. In that case, + * we don't apply a process limit. */ if (cc > sb_max_adj) return (0); |