20 #include "modules/subsys/posix/FileDescriptor.h" 21 #include "modules/subsys/posix/PosixSubsystem.h" 22 #include "pedigree/kernel/process/Process.h" 23 #include "pedigree/kernel/processor/Processor.h" 28 std::vector<FileDescriptor *> g_Descriptors;
32 if (fd >= g_Descriptors.size())
37 return g_Descriptors[fd];
48 if (fd > g_Descriptors.capacity())
50 g_Descriptors.reserve(fd + 1);
53 g_Descriptors.insert(g_Descriptors.begin() + fd, f);
56 size_t getAvailableDescriptor()
58 return g_Descriptors.size();
70 ERROR(
"No subsystem for this process!");
89 size_t getAvailableDescriptor()
92 return pSubsystem->
getFd();
static ProcessorInformation & information()
void addFileDescriptor(size_t fd, FileDescriptor *pFd)
FileDescriptor * getFileDescriptor(size_t fd)