MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / Get

Method Get

src/filesystem/file_descriptor.cpp:80–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80auto FileDescriptorTable::Get(int fd) -> vfs::File* {
81 if (fd < 0 || fd >= kMaxFd) {
82 return nullptr;
83 }
84
85 LockGuard guard(lock_);
86 return table_[fd];
87}
88
89auto FileDescriptorTable::Free(int fd) -> Expected<void> {
90 if (fd < 0 || fd >= kMaxFd) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected