diff options
-rw-r--r-- | sys/kern/kern_lock.c | 6 | ||||
-rw-r--r-- | sys/sys/lockmgr.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index fddfd26..5189bb7 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -259,6 +259,12 @@ debuglockmgr(lkp, flags, interlkp, td, name, file, line) if (error) break; sharelock(lkp, 1); +#if defined(DEBUG_LOCKS) + lkp->lk_slockholder = pid; + lkp->lk_sfilename = file; + lkp->lk_slineno = line; + lkp->lk_slockername = name; +#endif break; } /* diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index 9ba1884..b5bb251 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -62,6 +62,11 @@ struct lock { const char *lk_filename; const char *lk_lockername; int lk_lineno; + + pid_t lk_slockholder; + const char *lk_sfilename; + const char *lk_slockername; + int lk_slineno; #endif }; /* |