1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38: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:
asynts 2021-01-15 00:18:55 +01:00 committed by Andreas Kling
parent a348ab55b0
commit 7b0a1a98d9
12 changed files with 81 additions and 71 deletions

View file

@ -24,13 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Process.h>
#include <Kernel/VM/Region.h>
//#define FORK_DEBUG
namespace Kernel {
pid_t Process::sys$fork(RegisterState& regs)
@ -51,9 +50,7 @@ pid_t Process::sys$fork(RegisterState& regs)
child->m_pg = m_pg;
child->m_umask = m_umask;
#ifdef FORK_DEBUG
dbg() << "fork: child=" << child;
#endif
dbgln<debug_fork>("fork: child={}", child);
child->m_extra_gids = m_extra_gids;
@ -82,9 +79,7 @@ pid_t Process::sys$fork(RegisterState& regs)
{
ScopedSpinLock lock(m_lock);
for (auto& region : m_regions) {
#ifdef FORK_DEBUG
dbg() << "fork: cloning Region{" << &region << "} '" << region.name() << "' @ " << region.vaddr();
#endif
dbgln<debug_fork>("fork: cloning Region({}) '{}' @ {}", &region, region.name(), region.vaddr());
auto region_clone = region.clone(*child);
if (!region_clone) {
dbgln("fork: Cannot clone region, insufficient memory");