projects
/
voyage-au-centre-des-fichiers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f440d9
)
Changed assert to disable interrupts on assertion failure, before looping hlt
author
Amelia Coutard
<eliottulio.coutard@gmail.com>
Wed, 1 Jun 2022 01:24:20 +0000
(
03:24
+0200)
committer
Amelia Coutard
<eliottulio.coutard@gmail.com>
Wed, 1 Jun 2022 01:24:20 +0000
(
03:24
+0200)
src/serial.cpp
patch
|
blob
|
history
diff --git
a/src/serial.cpp
b/src/serial.cpp
index 2820cdf66241e0e7fbf2c587d0de42ee0366cb74..e60413ba64a7b5d590a27ee749fa22e47313e85d 100644
(file)
--- a/
src/serial.cpp
+++ b/
src/serial.cpp
@@
-1,6
+1,7
@@
#include <cstddef>
#include "serial.hpp"
#include "utils.hpp"
+#include "interrupts.hpp"
bool os::init_serial_port() {
outb(serial_port + 1, 0x00); // Disable interrupts.
@@
-68,6
+69,7
@@
void os::assert(bool cond, const char* diagnostic) {
if (!cond) {
os::print("Error: ");
os::println(diagnostic);
+ os::cli();
while (true) { os::hlt(); }
}
}