| 78 | } |
| 79 | |
| 80 | auto 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 | |
| 89 | auto FileDescriptorTable::Free(int fd) -> Expected<void> { |
| 90 | if (fd < 0 || fd >= kMaxFd) { |
nothing calls this directly
no outgoing calls
no test coverage detected