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