From b441c837001709d3348dd58659c545932f3d825e Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 7 Jul 2002 06:39:36 +0000 Subject: - Use 'options DEBUG_VFS_LOCKS' instead of the DEBUG_ALL_VFS_LOCKS environment variable to enable the lock verifiction code. --- sys/tools/vnode_if.awk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/tools') 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" \ -- cgit v1.1