mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
Kernel: Unbreak building with extra debug macros, part 1
This commit is contained in:
parent
8c1888811f
commit
eac3bbdcee
9 changed files with 24 additions and 14 deletions
|
@ -27,6 +27,8 @@
|
|||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
//#define DEBUG_IO
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
ssize_t Process::sys$read(int fd, Userspace<u8*> buffer, ssize_t size)
|
||||
|
@ -39,7 +41,7 @@ ssize_t Process::sys$read(int fd, Userspace<u8*> buffer, ssize_t size)
|
|||
if (!validate_write(buffer, size))
|
||||
return -EFAULT;
|
||||
#ifdef DEBUG_IO
|
||||
dbg() << "sys$read(" << fd << ", " << (const void*)buffer << ", " << size << ")";
|
||||
dbg() << "sys$read(" << fd << ", " << (const void*)buffer.ptr() << ", " << size << ")";
|
||||
#endif
|
||||
auto description = file_description(fd);
|
||||
if (!description)
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
//#define DEBUG_IO
|
||||
//#define DEBUG_POLL_SELECT
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
int Process::sys$select(const Syscall::SC_select_params* params)
|
||||
|
@ -189,7 +192,7 @@ int Process::sys$poll(Userspace<const Syscall::SC_poll_params*> user_params)
|
|||
current_thread->m_signal_mask = sigmask;
|
||||
|
||||
#if defined(DEBUG_IO) || defined(DEBUG_POLL_SELECT)
|
||||
dbg() << "polling on (read:" << rfds.size() << ", write:" << wfds.size() << "), timeout=" << timeout;
|
||||
dbg() << "polling on (read:" << rfds.size() << ", write:" << wfds.size() << "), timeout=" << timeout.tv_sec << "s" << timeout.tv_nsec << "ns";
|
||||
#endif
|
||||
|
||||
if (!params.timeout || has_timeout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue