diff options
author | jasone <jasone@FreeBSD.org> | 2001-01-22 05:56:55 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-01-22 05:56:55 +0000 |
commit | cf0a6d372c607c7f7bb5deb67edbb92ee2ad1409 (patch) | |
tree | 7e125efe3c57ff3e9c32c4a0f6019be57403fee3 /sys/kern/kern_mutex.c | |
parent | 71aff7f1c71bce310febb6c1d32660f8267e1c4a (diff) | |
download | FreeBSD-src-cf0a6d372c607c7f7bb5deb67edbb92ee2ad1409.zip FreeBSD-src-cf0a6d372c607c7f7bb5deb67edbb92ee2ad1409.tar.gz |
Print correct file name and line number in mtx_assert().
Noticed by: jake
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 1127a40..ae7da61 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -794,7 +794,7 @@ mtx_exit_hard(struct mtx *m, int type) #ifdef INVARIANTS void -mtx_assert(struct mtx *m, int what) +_mtx_assert(struct mtx *m, int what, const char *file, int line) { switch ((what)) { case MA_OWNED: @@ -802,23 +802,23 @@ mtx_assert(struct mtx *m, int what) case MA_OWNED | MA_NOTRECURSED: if (!mtx_owned((m))) panic("mutex %s not owned at %s:%d", - (m)->mtx_description, __FILE__, __LINE__); + (m)->mtx_description, file, line); if (mtx_recursed((m))) { if (((what) & MA_NOTRECURSED) != 0) panic("mutex %s recursed at %s:%d", - (m)->mtx_description, __FILE__, __LINE__); + (m)->mtx_description, file, line); } else if (((what) & MA_RECURSED) != 0) { panic("mutex %s unrecursed at %s:%d", - (m)->mtx_description, __FILE__, __LINE__); + (m)->mtx_description, file, line); } break; case MA_NOTOWNED: if (mtx_owned((m))) panic("mutex %s owned at %s:%d", - (m)->mtx_description, __FILE__, __LINE__); + (m)->mtx_description, file, line); break; default: - panic("unknown mtx_assert at %s:%d", __FILE__, __LINE__); + panic("unknown mtx_assert at %s:%d", file, line); } } #endif |