20#include <l4/l4re_vfs/vfs.h>
22namespace L4Re {
namespace Core {
29 enum { MAX_FILES = 50 };
31 Fd_store() noexcept : _fd_hint(0) {}
34 void free(
int fd) noexcept;
35 bool check_fd(
int fd) noexcept;
36 Ref_ptr<
L4Re::Vfs::File> get(
int fd) noexcept;
37 void set(
int fd, Ref_ptr<
L4Re::Vfs::File> const &f) noexcept;
41 Ref_ptr<
L4Re::Vfs::File> _files[MAX_FILES];
46Fd_store::check_fd(
int fd) noexcept
48 return fd >= 0 && fd < MAX_FILES;
52Ref_ptr<L4Re::Vfs::File>
53Fd_store::get(
int fd)
noexcept
58 return Ref_ptr<>::Nil;
63Fd_store::set(
int fd, Ref_ptr<L4Re::Vfs::File>
const &f)
noexcept
A reference-counting pointer with automatic cleanup.