20 #include "pedigree/kernel/syscallError.h" 22 #include "file-syscalls.h" 23 #include "modules/system/vfs/Pipe.h" 24 #include "modules/system/vfs/VFS.h" 25 #include "pipe-syscalls.h" 27 #include "pedigree/kernel/Subsystem.h" 28 #include <FileDescriptor.h> 29 #include <PosixSubsystem.h> 31 #include "modules/Module.h" 33 #include "pedigree/kernel/process/Process.h" 34 #include "pedigree/kernel/processor/Processor.h" 40 int posix_pipe(
int filedes[2])
43 reinterpret_cast<uintptr_t>(filedes),
sizeof(
int) * 2,
44 PosixSubsystem::SafeWrite))
46 F_NOTICE(
"pipe -> invalid address");
47 SYSCALL_ERROR(InvalidArgument);
59 ERROR(
"No subsystem for the process!");
63 size_t readFd = pSubsystem->
getFd();
64 size_t writeFd = pSubsystem->
getFd();
78 F_NOTICE(
"pipe: returning " << readFd <<
" and " << writeFd <<
".");
static ProcessorInformation & information()
void addFileDescriptor(size_t fd, FileDescriptor *pFd)
static bool checkAddress(uintptr_t addr, size_t extent, size_t flags)