mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
This commit is contained in:
parent
663a6141d8
commit
5356aae3cc
5 changed files with 57 additions and 71 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Net/Socket.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
@ -463,13 +464,9 @@ void Thread::WaitBlockCondition::try_unblock(Thread::WaitBlocker& blocker)
|
|||
if (blocker.is_wait()) {
|
||||
if (info.flags == Thread::WaitBlocker::UnblockFlags::Terminated) {
|
||||
m_processes.remove(i);
|
||||
#ifdef WAITBLOCK_DEBUG
|
||||
dbg() << "WaitBlockCondition[" << m_process << "] terminated, remove " << *info.process;
|
||||
#endif
|
||||
dbgln<debug_waitblock>("WaitBlockCondition[{}] terminated, remove {}", m_process, *info.process);
|
||||
} else {
|
||||
#ifdef WAITBLOCK_DEBUG
|
||||
dbg() << "WaitBlockCondition[" << m_process << "] terminated, mark as waited " << *info.process;
|
||||
#endif
|
||||
dbgln<debug_waitblock>("WaitBlockCondition[{}] terminated, mark as waited {}", m_process, *info.process);
|
||||
info.was_waited = true;
|
||||
}
|
||||
}
|
||||
|
@ -493,9 +490,7 @@ void Thread::WaitBlockCondition::disowned_by_waiter(Process& process)
|
|||
ASSERT(did_unblock); // disowning must unblock everyone
|
||||
return true;
|
||||
});
|
||||
#ifdef WAITBLOCK_DEBUG
|
||||
dbg() << "WaitBlockCondition[" << m_process << "] disowned " << *info.process;
|
||||
#endif
|
||||
dbgln<debug_waitblock>("WaitBlockCondition[{}] disowned {}", m_process, *info.process);
|
||||
m_processes.remove(i);
|
||||
continue;
|
||||
}
|
||||
|
@ -548,17 +543,13 @@ bool Thread::WaitBlockCondition::unblock(Process& process, WaitBlocker::UnblockF
|
|||
info.flags = flags;
|
||||
info.signal = signal;
|
||||
info.was_waited = did_wait;
|
||||
#ifdef WAITBLOCK_DEBUG
|
||||
dbg() << "WaitBlockCondition[" << m_process << "] update " << process << " flags: " << (int)flags << " mark as waited: " << info.was_waited;
|
||||
#endif
|
||||
dbgln<debug_waitblock>("WaitBlockCondition[{}] update {} flags={}, waited={}", m_process, process, (int)flags, info.was_waited);
|
||||
updated_existing = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!updated_existing) {
|
||||
#ifdef WAITBLOCK_DEBUG
|
||||
dbg() << "WaitBlockCondition[" << m_process << "] add " << process << " flags: " << (int)flags;
|
||||
#endif
|
||||
dbgln<debug_waitblock>("WaitBlockCondition[{}] add {} flags: {}", m_process, process, (int)flags);
|
||||
m_processes.append(ProcessBlockInfo(process, flags, signal));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue