Skip to content

Commit

Permalink
Kernel: Add dbgputch() to kstdio.h
Browse files Browse the repository at this point in the history
This adds a dbgputch() alongside dbgputstr() in kstdio.h. The function
already existed as the static function debugger_out(). It has now been
exposed to users of kstdio.h.
  • Loading branch information
MaxWipfli authored and awesomekling committed Jun 24, 2021
1 parent 441d6dc commit 6706790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Kernel/kprintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int snprintf(char* buffer, size_t size, const char* fmt, ...)
return ret;
}

static void debugger_out(char ch)
extern "C" void dbgputch(char ch)
{
if (serial_debug)
serial_putch(ch);
Expand All @@ -158,7 +158,7 @@ extern "C" void dbgputstr(const char* characters, size_t length)
return;
ScopedSpinLock lock(s_log_lock);
for (size_t i = 0; i < length; ++i)
debugger_out(characters[i]);
dbgputch(characters[i]);
}

extern "C" void kernelputstr(const char* characters, size_t length)
Expand Down
1 change: 1 addition & 0 deletions Kernel/kstdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <AK/Types.h>

extern "C" {
void dbgputch(char);
void dbgputstr(const char*, size_t);
void kernelputstr(const char*, size_t);
void kernelcriticalputstr(const char*, size_t);
Expand Down

0 comments on commit 6706790

Please sign in to comment.