mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
Kernel: Tidy up debug logging a little bit
When using dbg() in the kernel, the output is automatically prefixed with [Process(PID:TID)]. This makes it a lot easier to understand which thread is generating the output. This patch also cleans up some common logging messages and removes the now-unnecessary "dbg() << *current << ..." pattern.
This commit is contained in:
parent
5dd5d5ca4e
commit
f38cfb3562
9 changed files with 41 additions and 38 deletions
|
@ -636,21 +636,21 @@ inline u32 Thread::effective_priority() const
|
|||
return m_priority + m_process.priority_boost() + m_priority_boost + m_extra_priority;
|
||||
}
|
||||
|
||||
#define REQUIRE_NO_PROMISES \
|
||||
do { \
|
||||
if (current->process().has_promises()) { \
|
||||
dbg() << *current << " has made a promise"; \
|
||||
cli(); \
|
||||
current->process().crash(SIGABRT, 0); \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
} \
|
||||
#define REQUIRE_NO_PROMISES \
|
||||
do { \
|
||||
if (current->process().has_promises()) { \
|
||||
dbg() << "Has made a promise"; \
|
||||
cli(); \
|
||||
current->process().crash(SIGABRT, 0); \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define REQUIRE_PROMISE(promise) \
|
||||
do { \
|
||||
if (current->process().has_promises() \
|
||||
&& !current->process().has_promised(Pledge::promise)) { \
|
||||
dbg() << *current << " has not pledged " << #promise; \
|
||||
dbg() << "Has not pledged " << #promise; \
|
||||
cli(); \
|
||||
current->process().crash(SIGABRT, 0); \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue