projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename do_power_off to power_off_when_done.
[pintos-anon]
/
src
/
lib
/
debug.c
diff --git
a/src/lib/debug.c
b/src/lib/debug.c
index 7d520638c8cd9a9e8e60a3874b5ce5ae1dee7845..6d75e7a34c47bf25332d5a9cc24ac9cc153c217b 100644
(file)
--- a/
src/lib/debug.c
+++ b/
src/lib/debug.c
@@
-5,6
+5,7
@@
#include <stdio.h>
#include <string.h>
#ifdef KERNEL
#include <stdio.h>
#include <string.h>
#ifdef KERNEL
+#include "threads/init.h"
#include "threads/interrupt.h"
#include "devices/serial.h"
#else
#include "threads/interrupt.h"
#include "devices/serial.h"
#else
@@
-89,7
+90,9
@@
debug_panic (const char *file, int line, const char *function,
#ifdef KERNEL
serial_flush ();
#ifdef KERNEL
serial_flush ();
- power_off ();
+ if (power_off_when_done)
+ power_off ();
+ for (;;);
#else
exit (1);
#endif
#else
exit (1);
#endif