aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sdt.h
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2013-05-19 23:28:28 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2013-05-19 23:28:28 +0000
commit838eb8639c7001465413aa139dc8518bb60550a6 (patch)
tree74dd03afc71ca96442120cbb8b47fff063ab0ac6 /sys/sys/sdt.h
parent6bdfdb2c5e31f8cc59b92cb84688a21022011086 (diff)
downloadsrc-838eb8639c7001465413aa139dc8518bb60550a6.tar.gz
src-838eb8639c7001465413aa139dc8518bb60550a6.zip
Protect SDT_PROBE() with do { } while (0) loop.
Notes
Notes: svn path=/head/; revision=250816
Diffstat (limited to 'sys/sys/sdt.h')
-rw-r--r--sys/sys/sdt.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h
index e7b5478cdad0..522e1f2d38b3 100644
--- a/sys/sys/sdt.h
+++ b/sys/sys/sdt.h
@@ -184,11 +184,12 @@ struct sdt_provider {
#define SDT_PROBE_DECLARE(prov, mod, func, name) \
extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1]
-#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
+#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \
if (sdt_##prov##_##mod##_##func##_##name->id) \
(*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \
(uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \
- (uintptr_t) arg3, (uintptr_t) arg4)
+ (uintptr_t) arg3, (uintptr_t) arg4); \
+} while (0)
#define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type) \
static struct sdt_argtype sdt_##prov##_##mod##_##func##_##name##num[1] \