Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/repos/base-hw/src/core/include/kernel/lock.h b/repos/base-hw/src/core/include/kernel/lock.h
- index de49428..3564058 100644
- --- a/repos/base-hw/src/core/include/kernel/lock.h
- +++ b/repos/base-hw/src/core/include/kernel/lock.h
- @@ -19,6 +19,7 @@
- #include <base/lock_guard.h>
- #include <cpu/atomic.h>
- #include <cpu/memory_barrier.h>
- +#include <cpu.h>
- namespace Kernel
- {
- @@ -43,7 +44,17 @@ class Kernel::Lock
- /**
- * Request the lock
- */
- - void lock() { while (!Genode::cmpxchg(&_locked, 0, 1)); }
- + void lock()
- + {
- + if (!Genode::cmpxchg(&_locked, 0, 1)) {
- + PERR("An exception was raised during kernel execution!");
- + PERR("DFSR=%p IFSR=%p DFAR=%p",
- + (void*)Genode::Cpu::Dfsr::read(),
- + (void*)Genode::Cpu::Ifsr::read(),
- + (void*)Genode::Cpu::Dfar::read());
- + while (true) ;
- + }
- + }
- /**
- * Free the lock
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement