diff options
author | jeff <jeff@FreeBSD.org> | 2002-07-07 06:39:36 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-07-07 06:39:36 +0000 |
commit | b441c837001709d3348dd58659c545932f3d825e (patch) | |
tree | b3fc3f6a1a6de7815ef89d1c5ff5843ebfb6b524 | |
parent | cca3a0ef3d4f089d8381461b007fc544f7c4026a (diff) | |
download | FreeBSD-src-b441c837001709d3348dd58659c545932f3d825e.zip FreeBSD-src-b441c837001709d3348dd58659c545932f3d825e.tar.gz |
- Use 'options DEBUG_VFS_LOCKS' instead of the DEBUG_ALL_VFS_LOCKS
environment variable to enable the lock verifiction code.
-rw-r--r-- | sys/tools/vnode_if.awk | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 16475e4..2f92e18 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -65,7 +65,7 @@ function printh(s) {print s > hfile;} function add_debug_code(name, arg) { - if (debug_all_vfs_locks && lockdata[name, arg, "Entry"]) { + if (lockdata[name, arg, "Entry"]) { # Add assertions for locking if (lockdata[name, arg, "Entry"] == "L") printh("\tASSERT_VOP_LOCKED("arg", \""uname"\");"); @@ -79,15 +79,19 @@ function add_debug_code(name, arg) function add_debug_pre(name) { - if (debug_all_vfs_locks && lockdata[name, "pre"]) { + if (lockdata[name, "pre"]) { + printh("#ifdef DEBUG_VFS_LOCKS"); printh("\t"lockdata[name, "pre"]"(&a);"); + printh("#endif"); } } function add_debug_post(name) { - if (debug_all_vfs_locks && lockdata[name, "post"]) { + if (lockdata[name, "post"]) { + printh("#ifdef DEBUG_VFS_LOCKS"); printh("\t"lockdata[name, "post"]"(&a, rc);"); + printh("#endif"); } } @@ -125,8 +129,6 @@ if (!cfile && !hfile) if (!srcfile) usage(); -debug_all_vfs_locks = (ENVIRON["DEBUG_ALL_VFS_LOCKS"] ~ /[Yy][Ee][Ss]/); - common_head = \ "/*\n" \ " * This file is produced automatically.\n" \ |