diff options
Diffstat (limited to 'kern/lock_mon.c')
-rw-r--r-- | kern/lock_mon.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kern/lock_mon.c b/kern/lock_mon.c index b8216788..3ca4592c 100644 --- a/kern/lock_mon.c +++ b/kern/lock_mon.c @@ -46,6 +46,7 @@ #include <kern/thread.h> #include <kern/lock.h> #include <kern/printf.h> +#include <kern/mach_clock.h> #include <machine/ipl.h> #include <ddb/db_sym.h> #include <ddb/db_output.h> @@ -56,13 +57,10 @@ def_simple_lock_data(, kdb_lock) def_simple_lock_data(, printf_lock) #if NCPUS > 1 && MACH_LOCK_MON - -#if TIME_STAMP -extern time_stamp_t time_stamp; -#else /* TIME_STAMP */ +#define TIME_STAMP 1 typedef unsigned int time_stamp_t; -#define time_stamp 0 -#endif /* TIME_STAMP */ +/* in milliseconds */ +#define time_stamp (elapsed_ticks * 1000 / hz) #define LOCK_INFO_MAX (1024*32) #define LOCK_INFO_HASH_COUNT 1024 |