1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

- Use 'options DEBUG_VFS_LOCKS' instead of the DEBUG_ALL_VFS_LOCKS

environment variable to enable the lock verifiction code.
This commit is contained in:
Jeff Roberson 2002-07-07 06:39:36 +00:00
parent 18c48f437f
commit 5c08ffed5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99516

View File

@ -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" \