9#include <l4/l4re_vfs/vfs.h>
11namespace L4Re {
namespace Core {
18 enum { MAX_FILES = 50 };
20 Fd_store() noexcept : _fd_hint(0) {}
23 void free(
int fd) noexcept;
24 bool check_fd(
int fd) noexcept;
25 Ref_ptr<
L4Re::Vfs::File> get(
int fd) noexcept;
26 void set(
int fd, Ref_ptr<
L4Re::Vfs::File> const &f) noexcept;
30 Ref_ptr<
L4Re::Vfs::File> _files[MAX_FILES];
35Fd_store::check_fd(
int fd) noexcept
37 return fd >= 0 && fd < MAX_FILES;
41Ref_ptr<L4Re::Vfs::File>
42Fd_store::get(
int fd)
noexcept
47 return Ref_ptr<>::Nil;
52Fd_store::set(
int fd, Ref_ptr<L4Re::Vfs::File>
const &f)
noexcept
A reference-counting pointer with automatic cleanup.