[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
- Re: [PATCH 42/66] i386/i386at/lpr.c: remove uninitialized variable, (continued)
- [PATCH 44/66] i386/i386at/rtc.c: remove unused variable, Marin Ramesa, 2013/12/05
- [PATCH 45/66] i386/intel/pmap.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 47/66] ipc/ipc_init.c: qualify constant with const, Marin Ramesa, 2013/12/05
- [PATCH 46/66] i386/intel/pmap.c: remove unused variable, Marin Ramesa, 2013/12/05
- [PATCH 48/66] ipc/mach_port.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 49/66] ipc/port.h: update comment, Marin Ramesa, 2013/12/05
- [PATCH 50/66] kern/act.c, act.h: comment unused variable, Marin Ramesa, 2013/12/05
- [PATCH 51/66] kern/act.h: remove prototype without definition, Marin Ramesa, 2013/12/05
- [PATCH 52/66] kern/debug.c: initialize the lock,
Marin Ramesa <=
- [PATCH 53/66] kern/debug.c: initialize panicstr, Marin Ramesa, 2013/12/05
- [PATCH 54/66] kern/debug.c: remove unused variable, Marin Ramesa, 2013/12/05
- [PATCH 55/66] kern/lock_mon.c: remove unused variable, Marin Ramesa, 2013/12/05
- [PATCH 57/66] kern/lock_mon.c: remove dead assignments, Marin Ramesa, 2013/12/05
- [PATCH 56/66] kern/lock_mon.c: use spl_t instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 58/66] kern/pc_sample.c: remove unused variables, Marin Ramesa, 2013/12/05
- [PATCH 59/66] kern/priority.c: update comment, Marin Ramesa, 2013/12/05