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 Ref_ptr<
L4Re::Vfs::File> get(
int fd) throw();
36 void set(
int fd, Ref_ptr<
L4Re::Vfs::File> const &f) throw();
40 Ref_ptr<
L4Re::Vfs::File> _files[MAX_FILES];
45 Ref_ptr<
L4Re::Vfs::File>
46 Fd_store::get(
int fd) throw()
48 if (fd >= 0 && fd < MAX_FILES)
51 return Ref_ptr<>::Nil;
56 Fd_store::set(
int fd, Ref_ptr<L4Re::Vfs::File>
const &f)
throw()
A reference-counting pointer with automatic cleanup.