bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 52/66] kern/debug.c: initialize the lock


From: Marin Ramesa
Subject: [PATCH 52/66] kern/debug.c: initialize the lock
Date: Thu, 5 Dec 2013 22:03:46 +0100

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]