* kern/debug.c (Assert_print_lock): Initialize the lock. --- kern/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kern/debug.c b/kern/debug.c index 33e64f3..bdc87e2 100644 --- a/kern/debug.c +++ b/kern/debug.c @@ -45,7 +45,7 @@ extern int db_breakpoints_inserted; #endif #if NCPUS>1 -simple_lock_data_t Assert_print_lock; /* uninited, we take our chances */ +simple_lock_data_t Assert_print_lock; #endif static void @@ -58,6 +58,7 @@ void Assert(char *exp, char *file, int line) { #if NCPUS > 1 + simple_lock_init(&Assert_print_lock); simple_lock(&Assert_print_lock); printf("{%d} Assertion failed: file \"%s\", line %d\n", cpu_number(), file, line); -- 1.8.1.4