aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/mutex.h
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>2001-01-22 05:56:55 +0000
committerJason Evans <jasone@FreeBSD.org>2001-01-22 05:56:55 +0000
commit56771ca74b5ca2534bb504c808cdc366949696be (patch)
tree717a038f144c0f5b71cc026170adf4fac784bd78 /sys/sys/mutex.h
parent0c645db4c07d7c51478f23518c78355bc190d557 (diff)
downloadsrc-56771ca74b5ca2534bb504c808cdc366949696be.tar.gz
src-56771ca74b5ca2534bb504c808cdc366949696be.zip
Print correct file name and line number in mtx_assert().
Noticed by: jake
Notes
Notes: svn path=/head/; revision=71360
Diffstat (limited to 'sys/sys/mutex.h')
-rw-r--r--sys/sys/mutex.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index f2365f090809..479312f2ad72 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -185,7 +185,8 @@ do { \
#define MA_NOTOWNED 2
#define MA_RECURSED 4
#define MA_NOTRECURSED 8
-void mtx_assert(struct mtx *m, int what);
+void _mtx_assert(struct mtx *m, int what, const char *file, int line);
+#define mtx_assert(m, what) _mtx_assert((m), (what), __FILE__, __LINE__)
#else /* INVARIANTS */
#define mtx_assert(m, what)
#endif /* INVARIANTS */
@@ -276,8 +277,6 @@ int witness_sleep(int, struct mtx *, const char *, int);
#define WITNESS_RESTORE(m, n)
#endif /* WITNESS */
-/* XXX jasone Move. */
-
#endif /* _KERNEL */
#endif /* !LOCORE */
#endif /* _SYS_MUTEX_H_ */