summaryrefslogtreecommitdiffstats
path: root/sys/sys/sockbuf.h
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-11-30 11:22:39 +0000
committerglebius <glebius@FreeBSD.org>2014-11-30 11:22:39 +0000
commit176ae2299c3eee03a46a50c37b13594fb698d533 (patch)
tree4b7a2f533b16ec3f67dfe816935a3eab73aec573 /sys/sys/sockbuf.h
parent843bdaf93c5bcc30c703bf23ecfc9b1c69f3a7f7 (diff)
downloadFreeBSD-src-176ae2299c3eee03a46a50c37b13594fb698d533.zip
FreeBSD-src-176ae2299c3eee03a46a50c37b13594fb698d533.tar.gz
- Move sbcheck() declaration under SOCKBUF_DEBUG.
- Improve SOCKBUF_DEBUG macros. - Improve sbcheck(). Sponsored by: Netflix Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/sys/sockbuf.h')
-rw-r--r--sys/sys/sockbuf.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h
index ae06ac6..1cd419f 100644
--- a/sys/sys/sockbuf.h
+++ b/sys/sys/sockbuf.h
@@ -136,7 +136,6 @@ int sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0,
struct mbuf *control);
void sbappendrecord(struct sockbuf *sb, struct mbuf *m0);
void sbappendrecord_locked(struct sockbuf *sb, struct mbuf *m0);
-void sbcheck(struct sockbuf *sb);
void sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n);
struct mbuf *
sbcreatecontrol(caddr_t p, int size, int type, int level);
@@ -224,13 +223,15 @@ sbspace(struct sockbuf *sb)
#ifdef SOCKBUF_DEBUG
void sblastrecordchk(struct sockbuf *, const char *, int);
-#define SBLASTRECORDCHK(sb) sblastrecordchk((sb), __FILE__, __LINE__)
-
void sblastmbufchk(struct sockbuf *, const char *, int);
+void sbcheck(struct sockbuf *, const char *, int);
+#define SBLASTRECORDCHK(sb) sblastrecordchk((sb), __FILE__, __LINE__)
#define SBLASTMBUFCHK(sb) sblastmbufchk((sb), __FILE__, __LINE__)
+#define SBCHECK(sb) sbcheck((sb), __FILE__, __LINE__)
#else
-#define SBLASTRECORDCHK(sb) /* nothing */
-#define SBLASTMBUFCHK(sb) /* nothing */
+#define SBLASTRECORDCHK(sb) do {} while (0)
+#define SBLASTMBUFCHK(sb) do {} while (0)
+#define SBCHECK(sb) do {} while (0)
#endif /* SOCKBUF_DEBUG */
#endif /* _KERNEL */
OpenPOWER on IntegriCloud