L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
vfs.h
1/*
2 * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
5 *
6 * License: see LICENSE.spdx (in this directory or the directories above)
7 */
8#pragma once
9
10#include <l4/sys/compiler.h>
11
12#include <unistd.h>
13#include <stdarg.h>
14#include <fcntl.h>
15#include <sys/stat.h>
16#include <sys/time.h>
17#include <sys/mman.h>
18#include <sys/socket.h>
19#include <utime.h>
20#include <errno.h>
21
22#ifndef AT_FDCWD
23# define AT_FDCWD -100
24#endif
25
26#ifdef __cplusplus
27
28#include <l4/sys/capability>
29#include <l4/re/cap_alloc>
30#include <l4/re/dataspace>
31#include <l4/cxx/pair>
32#include <l4/cxx/ref_ptr>
33
34namespace L4Re {
38namespace Vfs {
39
40class Mount_tree;
41class File;
42
53{
54public:
60 enum Ready_type : unsigned
61 {
62 Read = 0,
63 Write,
64 Exception
65 };
66
67 virtual ~Generic_file() noexcept = 0;
68
80 virtual int unlock_all_locks() noexcept = 0;
81
90 virtual int fstat(struct stat64 *buf) const noexcept = 0;
91
97 virtual int fchmod(mode_t) noexcept = 0;
98
108 virtual int get_status_flags() const noexcept = 0;
109
125 virtual int set_status_flags(long flags) noexcept = 0;
126
127 virtual int utime(const struct utimbuf *) noexcept = 0;
128 virtual int utimes(const struct timeval [2]) noexcept = 0;
129 virtual ssize_t readlink(char *, size_t) = 0;
130
146 virtual bool check_ready(Ready_type rt) noexcept = 0;
147};
148
149inline
150Generic_file::~Generic_file() noexcept
151{}
152
161{
162public:
163 virtual ~Directory() noexcept = 0;
164
178 virtual int faccessat(const char *path, int mode, int flags) noexcept = 0;
179
192 virtual int mkdir(const char *path, mode_t mode) noexcept = 0;
193
204 virtual int unlink(const char *path) noexcept = 0;
205
219 virtual int rename(const char *src_path, const char *dst_path) noexcept = 0;
220
234 virtual int link(const char *src_path, const char *dst_path) noexcept = 0;
235
248 virtual int symlink(const char *src_path, const char *dst_path) noexcept = 0;
249
260 virtual int rmdir(const char *path) noexcept = 0;
261 virtual int openat(const char *path, int flags, mode_t mode,
262 cxx::Ref_ptr<File> *f) noexcept = 0;
263
264 virtual ssize_t getdents(char *buf, size_t sizebytes) noexcept = 0;
265
266 virtual int fchmodat(const char *pathname,
267 mode_t mode, int flags) noexcept = 0;
268
269 virtual int utimensat(const char *pathname,
270 const struct timespec times[2], int flags) noexcept = 0;
271
275 virtual int get_entry(const char *, int, mode_t, cxx::Ref_ptr<File> *) noexcept = 0;
276};
277
278inline
279Directory::~Directory() noexcept
280{}
281
288{
289public:
290 virtual ~Regular_file() noexcept = 0;
291
302 virtual L4::Cap<L4Re::Dataspace> data_space() noexcept = 0;
303
313 virtual ssize_t readv(const struct iovec*, int iovcnt) noexcept = 0;
314
325 virtual ssize_t writev(const struct iovec*, int iovcnt) noexcept = 0;
326
327 virtual ssize_t preadv(const struct iovec *iov, int iovcnt, off64_t offset) noexcept = 0;
328 virtual ssize_t pwritev(const struct iovec *iov, int iovcnt, off64_t offset) noexcept = 0;
329
337 virtual off64_t lseek(off64_t, int) noexcept = 0;
338
339
347 virtual int ftruncate(off64_t pos) noexcept = 0;
348
354 virtual int fsync() const noexcept = 0;
355
361 virtual int fdatasync() const noexcept = 0;
362
372 virtual int get_lock(struct flock64 *lock) noexcept = 0;
373
382 virtual int set_lock(struct flock64 *lock, bool wait) noexcept = 0;
383};
384
385inline
386Regular_file::~Regular_file() noexcept
387{}
388
389class Socket
390{
391public:
392 virtual ~Socket() noexcept = 0;
393 virtual int bind(sockaddr const *, socklen_t) noexcept = 0;
394 virtual int connect(sockaddr const *, socklen_t) noexcept = 0;
395 virtual ssize_t send(void const *, size_t, int) noexcept = 0;
396 virtual ssize_t recv(void *, size_t, int) noexcept = 0;
397 virtual ssize_t sendto(void const *, size_t, int, sockaddr const *, socklen_t) noexcept = 0;
398 virtual ssize_t recvfrom(void *, size_t, int, sockaddr *, socklen_t *) noexcept = 0;
399 virtual ssize_t sendmsg(msghdr const *, int) noexcept = 0;
400 virtual ssize_t recvmsg(msghdr *, int) noexcept = 0;
401 virtual int getsockopt(int level, int opt, void *, socklen_t *) noexcept = 0;
402 virtual int setsockopt(int level, int opt, void const *, socklen_t) noexcept = 0;
403 virtual int listen(int) noexcept = 0;
404 virtual int accept(sockaddr *addr, socklen_t *) noexcept = 0;
405 virtual int shutdown(int) noexcept = 0;
406
407 virtual int getsockname(sockaddr *, socklen_t *) noexcept = 0;
408 virtual int getpeername(sockaddr *, socklen_t *) noexcept = 0;
409};
410
411inline
412Socket::~Socket() noexcept
413{}
414
421{
422public:
423 virtual ~Special_file() noexcept = 0;
424
435 virtual int ioctl(unsigned long cmd, va_list args) noexcept = 0;
436};
437
438inline
439Special_file::~Special_file() noexcept
440{}
441
455class File :
456 public Generic_file,
457 public Regular_file,
458 public Directory,
459 public Special_file,
460 public Socket
461{
462 friend class Mount_tree;
463
464private:
465 void operator = (File const &);
466
467protected:
468 File() noexcept : _ref_cnt(0) {}
469 File(File const &)
470 : Generic_file(),Regular_file(), Directory(), Special_file(), _ref_cnt(0)
471 {}
472
473public:
474
475 const char *get_mount(const char *path, cxx::Ref_ptr<File> *dir,
476 cxx::Ref_ptr<Mount_tree> *mt = 0) noexcept;
477
478 int openat(const char *path, int flags, mode_t mode,
479 cxx::Ref_ptr<File> *f) noexcept override;
480
481 void add_ref() noexcept { ++_ref_cnt; }
482 int remove_ref() noexcept { return --_ref_cnt; }
483
484 virtual ~File() noexcept = 0;
485
486 cxx::Ref_ptr<Mount_tree> mount_tree() const noexcept
487 { return _mount_tree; }
488
489 char const *path() const noexcept { return _path; }
490
491private:
492 int _ref_cnt;
493 cxx::Ref_ptr<Mount_tree> _mount_tree;
494 char _path[80] = "";
495};
496
497inline
498File::~File() noexcept
499{}
500
501class Path
502{
503private:
504 char const *_p;
505 unsigned _l;
506
507public:
508 Path() noexcept : _p(0), _l(0) {}
509
510 explicit Path(char const *p) noexcept : _p(p)
511 { for (_l = 0; *p; ++p, ++_l) ; }
512
513 Path(char const *p, unsigned l) noexcept : _p(p), _l(l)
514 {}
515
516 static bool __is_sep(char s) noexcept;
517
518 Path cmp_path(char const *prefix) const noexcept;
519
520 struct Invalid_ptr;
521 operator Invalid_ptr const * () const
522 { return reinterpret_cast<Invalid_ptr const *>(_p); }
523
524 unsigned length() const { return _l; }
525 char const *path() const { return _p; }
526
527 bool empty() const { return _l == 0; }
528
529 bool is_sep(unsigned offset) const { return __is_sep(_p[offset]); }
530
531 bool strip_sep()
532 {
533 bool s = false;
534 for (; __is_sep(*_p) && _l; ++_p, --_l)
535 s = true;
536 return s;
537 }
538
539 Path first() const
540 {
541 unsigned i;
542 for (i = 0; i < _l && !is_sep(i); ++i)
543 ;
544
545 return Path(_p, i);
546 }
547
548 Path strip_first()
549 {
550 Path r = first();
551 _p += r.length();
552 _l -= r.length();
553 strip_sep();
554 return r;
555 }
556
557};
558
559
566class Mount_tree
567{
568public:
569
570 explicit Mount_tree(char *n) noexcept;
571
572 Path lookup(Path const &path, cxx::Ref_ptr<Mount_tree> *mt,
573 cxx::Ref_ptr<Mount_tree> *mp = 0) noexcept;
574
575 Path find(Path const &p, cxx::Ref_ptr<Mount_tree> *t) noexcept;
576
577 cxx::Ref_ptr<File> mount() const
578 { return _mount; }
579
580 void mount(cxx::Ref_ptr<File> const &m)
581 {
582 m->_mount_tree = cxx::ref_ptr(this);
583 _mount = m;
584 }
585
586 static int create_tree(cxx::Ref_ptr<Mount_tree> const &root,
587 char const *path,
588 cxx::Ref_ptr<File> const &dir) noexcept;
589
590 void add_child_node(cxx::Ref_ptr<Mount_tree> const &cld);
591
592 virtual ~Mount_tree() noexcept = 0;
593
594 void add_ref() noexcept { ++_ref_cnt; }
595 int remove_ref() noexcept { return --_ref_cnt; }
596
597private:
598 friend class Real_mount_tree;
599
600 int _ref_cnt;
601 char *_name;
604 cxx::Ref_ptr<File> _mount;
605};
606
607inline
608Mount_tree::~Mount_tree() noexcept
609{}
610
611inline bool
612Path::__is_sep(char s) noexcept
613{ return s == '/'; }
614
615inline Path
616Path::cmp_path(char const *n) const noexcept
617{
618 char const *p = _p;
619 for (; *p && !__is_sep(*p) && *n; ++p, ++n)
620 if (*p != *n)
621 return Path();
622
623 if (*n || (*p && !__is_sep(*p)))
624 return Path();
625
626 return Path(p, _l - (p - _p));
627}
628
629inline
630Mount_tree::Mount_tree(char *n) noexcept
631: _ref_cnt(0), _name(n)
632{}
633
634inline Path
635Mount_tree::find(Path const &p, cxx::Ref_ptr<Mount_tree> *t) noexcept
636{
637 if (!_cld)
638 return Path();
639
640 for (cxx::Ref_ptr<Mount_tree> x = _cld; x; x = x->_sib)
641 {
642 Path const r = p.cmp_path(x->_name);
643 if (r)
644 {
645 *t = x;
646 return r;
647 }
648 }
649
650 return Path();
651}
652
653inline Path
654Mount_tree::lookup(Path const &path, cxx::Ref_ptr<Mount_tree> *mt,
655 cxx::Ref_ptr<Mount_tree> *mp) noexcept
656{
658 Path p = path;
659
660 if (p.first().cmp_path("."))
661 p.strip_first();
662
663 Path last_mp = p;
664
665 if (mp)
666 *mp = x;;
667
668 while (1)
669 {
670 Path r = x->find(p, &x);
671
672 if (!r)
673 {
674 if (mp)
675 return last_mp;
676
677 if (mt)
678 *mt = x;
679
680 return p;
681 }
682
683 r.strip_sep();
684
685 if (mp && x->_mount)
686 {
687 last_mp = r;
688 *mp = x;
689 }
690
691 if (r.empty())
692 {
693 if (mt)
694 *mt = x;
695
696 if (mp)
697 return last_mp;
698 else
699 return r;
700 }
701
702 p = r;
703 }
704}
705
706inline
707void
708Mount_tree::add_child_node(cxx::Ref_ptr<Mount_tree> const &cld)
709{
710 cld->_sib = _cld;
711 _cld = cld;
712}
713
714inline
715const char *
716File::get_mount(const char *path, cxx::Ref_ptr<File> *dir,
717 cxx::Ref_ptr<Mount_tree> *mt) noexcept
718{
719 if (!_mount_tree)
720 {
721 *dir = cxx::ref_ptr(this);
722 return path;
723 }
724
726 Path p = _mount_tree->lookup(Path(path), mt, &mp);
727 if (mp->mount())
728 {
729 *dir = mp->mount();
730 return p.path();
731 }
732 else
733 {
734 *dir = cxx::ref_ptr(this);
735 return path;
736 }
737}
738
739inline int
740File::openat(const char *path, int flags, mode_t mode,
741 cxx::Ref_ptr<File> *f) noexcept
742{
745 char const *m_path = get_mount(path, &dir, &mt);
746
747 int res = dir->get_entry(m_path, flags, mode, f);
748
749 if (res < 0)
750 return res;
751
752 if (!(*f)->_mount_tree && mt)
753 (*f)->_mount_tree = mt;
754
755 // Debugging {
756 size_t i = 0;
757 for (; i < sizeof((*f)->_path) - 1 && path[i]; ++i)
758 (*f)->_path[i] = path[i];
759 (*f)->_path[i] = '\0';
760 // } Debugging
761
762 return res;
763}
764
773class Mman
774{
775public:
777 virtual int mmap2(void *start, size_t len, int prot, int flags, int fd,
778 off_t offset, void **ptr) noexcept = 0;
779
781 virtual int munmap(void *start, size_t len) noexcept = 0;
782
784 virtual int mremap(void *old, size_t old_sz, size_t new_sz, int flags,
785 void **new_addr) noexcept = 0;
786
788 virtual int mprotect(const void *a, size_t sz, int prot) noexcept = 0;
789
791 virtual int msync(void *addr, size_t len, int flags) noexcept = 0;
792
794 virtual int madvise(void *addr, size_t len, int advice) noexcept = 0;
795
796 virtual ~Mman() noexcept = 0;
797};
798
799inline
800Mman::~Mman() noexcept {}
801
802class File_factory
803{
804private:
805 int _ref_cnt = 0;
806 int _proto = 0;
807 char const *_proto_name = 0;
808
809 template<typename T> friend struct cxx::Default_ref_counter;
810 void add_ref() noexcept { ++_ref_cnt; }
811 int remove_ref() noexcept { return --_ref_cnt; }
812
813public:
814 explicit File_factory(int proto) : _proto(proto) {}
815 explicit File_factory(char const *proto_name) : _proto_name(proto_name) {}
816 File_factory(int proto, char const *proto_name)
817 : _proto(proto), _proto_name(proto_name)
818 {}
819
820 File_factory(File_factory const &) = delete;
821 File_factory &operator = (File_factory const &) = delete;
822
823 char const *proto_name() const { return _proto_name; }
824 int proto() const { return _proto; }
825
826 virtual ~File_factory() noexcept = 0;
827 virtual cxx::Ref_ptr<File> create(L4::Cap<void> file) = 0;
828};
829
830inline File_factory::~File_factory() noexcept {}
831
832template<typename IFACE, typename IMPL>
833class File_factory_t : public File_factory
834{
835public:
836 File_factory_t()
837 : File_factory(IFACE::Protocol, L4::kobject_typeid<IFACE>()->name())
838 {}
839
840 cxx::Ref_ptr<File> create(L4::Cap<void> file) override
841 { return cxx::make_ref_obj<IMPL>(L4::cap_cast<IFACE>(file)); }
842};
843
858{
859protected:
860 File_system *_next;
861
862public:
863 File_system() noexcept : _next(0) {}
869 virtual char const *type() const noexcept = 0;
870
887 virtual int mount(char const *source, unsigned long mountflags,
888 void const *data, cxx::Ref_ptr<File> *dir) noexcept = 0;
889
890 virtual ~File_system() noexcept = 0;
891
896 File_system *next() const noexcept { return _next; }
897 File_system *&next() noexcept { return _next; }
898 void next(File_system *n) noexcept { _next = n; }
899};
900
901inline
902File_system::~File_system() noexcept
903{}
904
905class File_system_list
906{
907public:
908 class Iterator
909 {
910 public:
911 explicit constexpr Iterator(File_system *c = nullptr) : _c(c) {}
912
913 Iterator &operator++()
914 {
915 if (_c)
916 _c = _c->next();
917 return *this;
918 }
919
920 bool operator==(Iterator const &other) const { return _c == other._c; }
921 bool operator!=(Iterator const &other) const { return _c != other._c; }
922 File_system *operator*() const { return _c; }
923 File_system *operator->() const { return _c; }
924
925 private:
926 File_system *_c;
927 };
928
929 File_system_list(File_system *head) : _head(head) {}
930
931 constexpr Iterator begin() const
932 { return Iterator(_head); }
933
934 constexpr Iterator end() const
935 { return Iterator(); }
936
937private:
938 File_system *_head;
939};
940
946class Fs
947{
948public:
954 virtual cxx::Ref_ptr<File> get_file(int fd) noexcept = 0;
955
957 virtual cxx::Ref_ptr<File> get_root() noexcept = 0;
958
960 virtual cxx::Ref_ptr<File> get_cwd() noexcept { return get_root(); }
961
963 virtual void set_cwd(cxx::Ref_ptr<File> const &) noexcept {}
964
970 virtual int alloc_fd(cxx::Ref_ptr<File> const &f = cxx::Ref_ptr<>::Nil) noexcept = 0;
971
982 virtual cxx::Pair<cxx::Ref_ptr<File>, int>
983 set_fd(int fd, cxx::Ref_ptr<File> const &f = cxx::Ref_ptr<>::Nil) noexcept = 0;
984
990 virtual cxx::Ref_ptr<File> free_fd(int fd) noexcept = 0;
991
999 virtual int mount(char const *path, cxx::Ref_ptr<File> const &dir) noexcept = 0;
1000
1008 virtual int register_file_system(File_system *f) noexcept = 0;
1009
1017 virtual int unregister_file_system(File_system *f) noexcept = 0;
1018
1026 virtual File_system *get_file_system(char const *fstype) noexcept = 0;
1027
1036 virtual File_system_list file_system_list() noexcept = 0;
1037
1041 int mount(char const *source, char const *target,
1042 char const *fstype, unsigned long mountflags,
1043 void const *data) noexcept;
1044
1045 virtual int register_file_factory(cxx::Ref_ptr<File_factory> f) noexcept = 0;
1046 virtual int unregister_file_factory(cxx::Ref_ptr<File_factory> f) noexcept = 0;
1047 virtual cxx::Ref_ptr<File_factory> get_file_factory(int proto) noexcept = 0;
1048 virtual cxx::Ref_ptr<File_factory> get_file_factory(char const *proto_name) noexcept = 0;
1049
1050 virtual ~Fs() = 0;
1051
1052private:
1053 int mount_one(char const *source, char const *target,
1054 File_system *fs, unsigned long mountflags,
1055 void const *data) noexcept;
1056};
1057
1058inline int
1059Fs::mount_one(char const *source, char const *target,
1060 File_system *fs, unsigned long mountflags,
1061 void const *data) noexcept
1062{
1064 int res = fs->mount(source, mountflags, data, &dir);
1065
1066 if (res < 0)
1067 return res;
1068
1069 return mount(target, dir);
1070}
1071
1072inline int
1073Fs::mount(char const *source, char const *target,
1074 char const *fstype, unsigned long mountflags,
1075 void const *data) noexcept
1076{
1077 if ( fstype[0] == 'a'
1078 && fstype[1] == 'u'
1079 && fstype[2] == 't'
1080 && fstype[3] == 'o'
1081 && fstype[4] == 0)
1082 {
1083 File_system_list fsl = file_system_list();
1084 for (File_system_list::Iterator c = fsl.begin(); c != fsl.end(); ++c)
1085 if (mount_one(source, target, *c, mountflags, data) == 0)
1086 return 0;
1087
1088 return -ENODEV;
1089 }
1090
1091 File_system *fs = get_file_system(fstype);
1092
1093 if (!fs)
1094 return -ENODEV;
1095
1096 return mount_one(source, target, fs, mountflags, data);
1097}
1098
1099inline
1100Fs::~Fs()
1101{}
1102
1109class Ops : public Mman, public Fs
1110{
1111public:
1112 virtual void *malloc(size_t bytes) noexcept = 0;
1113 virtual void free(void *mem) noexcept = 0;
1114 virtual ~Ops() noexcept = 0;
1115
1116 char *strndup(char const *str, unsigned l) noexcept
1117 {
1118 unsigned len;
1119 for (len = 0; str[len] && len < l; ++len)
1120 ;
1121
1122 if (len == 0)
1123 return nullptr;
1124
1125 ++len;
1126
1127 char *b = static_cast<char *>(this->malloc(len));
1128 if (b == nullptr)
1129 return nullptr;
1130
1131 char *r = b;
1132 for (; len - 1 > 0 && *str; --len, ++b, ++str)
1133 *b = *str;
1134
1135 *b = 0;
1136 return r;
1137 }
1138
1139};
1140
1141inline
1142Ops::~Ops() noexcept
1143{}
1144
1145}}
1146
1147#endif
1148
Abstract capability-allocator interface.
L4::Cap related definitions.
Interface for a POSIX file that is a directory.
Definition vfs.h:161
virtual int mkdir(const char *path, mode_t mode) noexcept=0
Create a new subdirectory.
virtual int link(const char *src_path, const char *dst_path) noexcept=0
Create a hard link (second name) for the given file.
virtual int unlink(const char *path) noexcept=0
Unlink the given file from that directory.
virtual int symlink(const char *src_path, const char *dst_path) noexcept=0
Create a symbolic link for the given file.
virtual int rmdir(const char *path) noexcept=0
Delete an empty directory.
virtual int rename(const char *src_path, const char *dst_path) noexcept=0
Rename the given file.
virtual int faccessat(const char *path, int mode, int flags) noexcept=0
Check access permissions on the given file.
Basic interface for an L4Re::Vfs file system.
Definition vfs.h:858
virtual char const * type() const noexcept=0
Returns the type of the file system used in mount as fstype argument.
The basic interface for an open POSIX file.
Definition vfs.h:461
POSIX File-system related functionality.
Definition vfs.h:947
virtual void set_cwd(cxx::Ref_ptr< File > const &) noexcept
Set the current working directory for the application.
Definition vfs.h:963
virtual int mount(char const *path, cxx::Ref_ptr< File > const &dir) noexcept=0
Mount a given file object at the given global path in the VFS.
virtual cxx::Ref_ptr< File > get_file(int fd) noexcept=0
Get the L4Re::Vfs::File for the file descriptor fd.
virtual cxx::Ref_ptr< File > free_fd(int fd) noexcept=0
Free the file descriptor fd.
virtual cxx::Pair< cxx::Ref_ptr< File >, int > set_fd(int fd, cxx::Ref_ptr< File > const &f=cxx::Ref_ptr<>::Nil) noexcept=0
Set the file object referenced by the file descriptor fd.
virtual int alloc_fd(cxx::Ref_ptr< File > const &f=cxx::Ref_ptr<>::Nil) noexcept=0
Allocate the next free file descriptor.
virtual cxx::Ref_ptr< File > get_root() noexcept=0
Get the directory object for the application's root directory.
The common interface for an open POSIX file.
Definition vfs.h:53
virtual int unlock_all_locks() noexcept=0
Unlock all locks on the file.
virtual int fchmod(mode_t) noexcept=0
Change POSIX access rights on the file.
virtual int fstat(struct stat64 *buf) const noexcept=0
Get status information for the file.
virtual int set_status_flags(long flags) noexcept=0
Set file status flags (fcntl F_SETFL).
Ready_type
Type of I/O operation/condition a file can indicate readiness.
Definition vfs.h:61
virtual bool check_ready(Ready_type rt) noexcept=0
Check whether the file is ready for an I/O operation/condition.
virtual int get_status_flags() const noexcept=0
Get file status flags (fcntl F_GETFL).
Interface for POSIX memory management.
Definition vfs.h:774
virtual int mmap2(void *start, size_t len, int prot, int flags, int fd, off_t offset, void **ptr) noexcept=0
Backend for the mmap2 system call.
virtual int msync(void *addr, size_t len, int flags) noexcept=0
Backend for the msync system call.
virtual int munmap(void *start, size_t len) noexcept=0
Backend for the munmap system call.
virtual int mremap(void *old, size_t old_sz, size_t new_sz, int flags, void **new_addr) noexcept=0
Backend for the mremap system call.
virtual int madvise(void *addr, size_t len, int advice) noexcept=0
Backend for the madvice system call.
virtual int mprotect(const void *a, size_t sz, int prot) noexcept=0
Backend for the mprotect system call.
Interface for the POSIX backends of an application.
Definition vfs.h:1110
Interface for a POSIX file that provides regular file semantics.
Definition vfs.h:288
virtual L4::Cap< L4Re::Dataspace > data_space() noexcept=0
Get an L4Re::Dataspace object for the file.
Interface for a POSIX file that provides special file semantics.
Definition vfs.h:421
virtual int ioctl(unsigned long cmd, va_list args) noexcept=0
The famous IO control.
C++ interface for capabilities.
Definition capability.h:224
A reference-counting pointer with automatic cleanup.
Definition ref_ptr:71
L4 compiler related defines.
Dataspace interface.
Type_info const * kobject_typeid() noexcept
Get the L4::Type_info for the L4Re interface given in T.
Definition __typeinfo.h:682
L4Re C++ Interfaces.
Definition cmd_control:14
L4 low-level kernel interface.
Our C++ library.
Definition arith:11
Pair implementation.
Pair of two values.
Definition pair:28