L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
9 *
10 * As a special exception, you may use this file as part of a free software
11 * library without restriction. Specifically, if other files instantiate
12 * templates or use macros or inline functions from this file, or you compile
13 * this file and link it with other files to produce an executable, this
14 * file does not by itself cause the resulting executable to be covered by
15 * the GNU General Public License. This exception does not however
16 * invalidate any other reasons why the executable file might be covered by
17 * the GNU General Public License.
18 */
19#pragma once
20
21#include <l4/sys/compiler.h>
22
23#include <unistd.h>
24#include <stdarg.h>
25#include <fcntl.h>
26#include <sys/stat.h>
27#include <sys/mman.h>
28#include <sys/socket.h>
29#include <utime.h>
30#include <errno.h>
31
32#ifndef AT_FDCWD
33# define AT_FDCWD -100
34#endif
35
36#ifdef __cplusplus
37
38#include <l4/sys/capability>
39#include <l4/re/cap_alloc>
40#include <l4/re/dataspace>
41#include <l4/cxx/pair>
42#include <l4/cxx/ref_ptr>
43
44namespace L4Re {
48namespace Vfs {
49
50class Mount_tree;
51class File;
52
63{
64public:
65 virtual ~Generic_file() noexcept = 0;
77 virtual int unlock_all_locks() noexcept = 0;
78
87 virtual int fstat64(struct stat64 *buf) const noexcept = 0;
88
94 virtual int fchmod(mode_t) noexcept = 0;
95
105 virtual int get_status_flags() const noexcept = 0;
106
122 virtual int set_status_flags(long flags) noexcept = 0;
123
124 virtual int utime(const struct utimbuf *) noexcept = 0;
125 virtual int utimes(const struct timeval [2]) noexcept = 0;
126 virtual ssize_t readlink(char *, size_t) = 0;
127};
128
129inline
130Generic_file::~Generic_file() noexcept
131{}
132
141{
142public:
143 virtual ~Directory() noexcept = 0;
144
158 virtual int faccessat(const char *path, int mode, int flags) noexcept = 0;
159
172 virtual int mkdir(const char *path, mode_t mode) noexcept = 0;
173
184 virtual int unlink(const char *path) noexcept = 0;
185
199 virtual int rename(const char *src_path, const char *dst_path) noexcept = 0;
200
214 virtual int link(const char *src_path, const char *dst_path) noexcept = 0;
215
228 virtual int symlink(const char *src_path, const char *dst_path) noexcept = 0;
229
240 virtual int rmdir(const char *path) noexcept = 0;
241 virtual int openat(const char *path, int flags, mode_t mode,
242 cxx::Ref_ptr<File> *f) noexcept = 0;
243
244 virtual ssize_t getdents(char *buf, size_t sizebytes) noexcept = 0;
245
246 virtual int fchmodat(const char *pathname,
247 mode_t mode, int flags) noexcept = 0;
248
249 virtual int utimensat(const char *pathname,
250 const struct timespec times[2], int flags) noexcept = 0;
251
255 virtual int get_entry(const char *, int, mode_t, cxx::Ref_ptr<File> *) noexcept = 0;
256};
257
258inline
259Directory::~Directory() noexcept
260{}
261
268{
269public:
270 virtual ~Regular_file() noexcept = 0;
271
282 virtual L4::Cap<L4Re::Dataspace> data_space() noexcept = 0;
283
293 virtual ssize_t readv(const struct iovec*, int iovcnt) noexcept = 0;
294
305 virtual ssize_t writev(const struct iovec*, int iovcnt) noexcept = 0;
306
307 virtual ssize_t preadv(const struct iovec *iov, int iovcnt, off64_t offset) noexcept = 0;
308 virtual ssize_t pwritev(const struct iovec *iov, int iovcnt, off64_t offset) noexcept = 0;
309
317 virtual off64_t lseek64(off64_t, int) noexcept = 0;
318
319
327 virtual int ftruncate64(off64_t pos) noexcept = 0;
328
334 virtual int fsync() const noexcept = 0;
335
341 virtual int fdatasync() const noexcept = 0;
342
352 virtual int get_lock(struct flock64 *lock) noexcept = 0;
353
362 virtual int set_lock(struct flock64 *lock, bool wait) noexcept = 0;
363};
364
365inline
366Regular_file::~Regular_file() noexcept
367{}
368
369class Socket
370{
371public:
372 virtual ~Socket() noexcept = 0;
373 virtual int bind(sockaddr const *, socklen_t) noexcept = 0;
374 virtual int connect(sockaddr const *, socklen_t) noexcept = 0;
375 virtual ssize_t send(void const *, size_t, int) noexcept = 0;
376 virtual ssize_t recv(void *, size_t, int) noexcept = 0;
377 virtual ssize_t sendto(void const *, size_t, int, sockaddr const *, socklen_t) noexcept = 0;
378 virtual ssize_t recvfrom(void *, size_t, int, sockaddr *, socklen_t *) noexcept = 0;
379 virtual ssize_t sendmsg(msghdr const *, int) noexcept = 0;
380 virtual ssize_t recvmsg(msghdr *, int) noexcept = 0;
381 virtual int getsockopt(int level, int opt, void *, socklen_t *) noexcept = 0;
382 virtual int setsockopt(int level, int opt, void const *, socklen_t) noexcept = 0;
383 virtual int listen(int) noexcept = 0;
384 virtual int accept(sockaddr *addr, socklen_t *) noexcept = 0;
385 virtual int shutdown(int) noexcept = 0;
386
387 virtual int getsockname(sockaddr *, socklen_t *) noexcept = 0;
388 virtual int getpeername(sockaddr *, socklen_t *) noexcept = 0;
389};
390
391inline
392Socket::~Socket() noexcept
393{}
394
401{
402public:
403 virtual ~Special_file() noexcept = 0;
404
415 virtual int ioctl(unsigned long cmd, va_list args) noexcept = 0;
416};
417
418inline
419Special_file::~Special_file() noexcept
420{}
421
435class File :
436 public Generic_file,
437 public Regular_file,
438 public Directory,
439 public Special_file,
440 public Socket
441{
442 friend class Mount_tree;
443
444private:
445 void operator = (File const &);
446
447protected:
448 File() noexcept : _ref_cnt(0) {}
449 File(File const &)
450 : Generic_file(),Regular_file(), Directory(), Special_file(), _ref_cnt(0)
451 {}
452
453public:
454
455 const char *get_mount(const char *path, cxx::Ref_ptr<File> *dir,
456 cxx::Ref_ptr<Mount_tree> *mt = 0) noexcept;
457
458 int openat(const char *path, int flags, mode_t mode,
459 cxx::Ref_ptr<File> *f) noexcept override;
460
461 void add_ref() noexcept { ++_ref_cnt; }
462 int remove_ref() noexcept { return --_ref_cnt; }
463
464 virtual ~File() noexcept = 0;
465
466 cxx::Ref_ptr<Mount_tree> mount_tree() const noexcept
467 { return _mount_tree; }
468
469 virtual int select(int nfds, fd_set *readfds, fd_set *writefds,
470 fd_set *exceptfds, struct timeval *timeout) throw() = 0;
471
472private:
473 int _ref_cnt;
474 cxx::Ref_ptr<Mount_tree> _mount_tree;
475
476};
477
478inline
479File::~File() noexcept
480{}
481
482class Path
483{
484private:
485 char const *_p;
486 unsigned _l;
487
488public:
489 Path() noexcept : _p(0), _l(0) {}
490
491 explicit Path(char const *p) noexcept : _p(p)
492 { for (_l = 0; *p; ++p, ++_l) ; }
493
494 Path(char const *p, unsigned l) noexcept : _p(p), _l(l)
495 {}
496
497 static bool __is_sep(char s) noexcept;
498
499 Path cmp_path(char const *prefix) const noexcept;
500
501 struct Invalid_ptr;
502 operator Invalid_ptr const * () const
503 { return reinterpret_cast<Invalid_ptr const *>(_p); }
504
505 unsigned length() const { return _l; }
506 char const *path() const { return _p; }
507
508 bool empty() const { return _l == 0; }
509
510 bool is_sep(unsigned offset) const { return __is_sep(_p[offset]); }
511
512 bool strip_sep()
513 {
514 bool s = false;
515 for (; __is_sep(*_p) && _l; ++_p, --_l)
516 s = true;
517 return s;
518 }
519
520 Path first() const
521 {
522 unsigned i;
523 for (i = 0; i < _l && !is_sep(i); ++i)
524 ;
525
526 return Path(_p, i);
527 }
528
529 Path strip_first()
530 {
531 Path r = first();
532 _p += r.length();
533 _l -= r.length();
534 strip_sep();
535 return r;
536 }
537
538};
539
540
547class Mount_tree
548{
549public:
550
551 explicit Mount_tree(char *n) noexcept;
552
553 Path lookup(Path const &path, cxx::Ref_ptr<Mount_tree> *mt,
554 cxx::Ref_ptr<Mount_tree> *mp = 0) noexcept;
555
556 Path find(Path const &p, cxx::Ref_ptr<Mount_tree> *t) noexcept;
557
558 cxx::Ref_ptr<File> mount() const
559 { return _mount; }
560
561 void mount(cxx::Ref_ptr<File> const &m)
562 {
563 m->_mount_tree = cxx::ref_ptr(this);
564 _mount = m;
565 }
566
567 static int create_tree(cxx::Ref_ptr<Mount_tree> const &root,
568 char const *path,
569 cxx::Ref_ptr<File> const &dir) noexcept;
570
571 void add_child_node(cxx::Ref_ptr<Mount_tree> const &cld);
572
573 virtual ~Mount_tree() noexcept = 0;
574
575 void add_ref() noexcept { ++_ref_cnt; }
576 int remove_ref() noexcept { return --_ref_cnt; }
577
578private:
579 friend class Real_mount_tree;
580
581 int _ref_cnt;
582 char *_name;
585 cxx::Ref_ptr<File> _mount;
586};
587
588inline
589Mount_tree::~Mount_tree() noexcept
590{}
591
592inline bool
593Path::__is_sep(char s) noexcept
594{ return s == '/'; }
595
596inline Path
597Path::cmp_path(char const *n) const noexcept
598{
599 char const *p = _p;
600 for (; *p && !__is_sep(*p) && *n; ++p, ++n)
601 if (*p != *n)
602 return Path();
603
604 if (*n || (*p && !__is_sep(*p)))
605 return Path();
606
607 return Path(p, _l - (p - _p));
608}
609
610inline
611Mount_tree::Mount_tree(char *n) noexcept
612: _ref_cnt(0), _name(n)
613{}
614
615inline Path
616Mount_tree::find(Path const &p, cxx::Ref_ptr<Mount_tree> *t) noexcept
617{
618 if (!_cld)
619 return Path();
620
621 for (cxx::Ref_ptr<Mount_tree> x = _cld; x; x = x->_sib)
622 {
623 Path const r = p.cmp_path(x->_name);
624 if (r)
625 {
626 *t = x;
627 return r;
628 }
629 }
630
631 return Path();
632}
633
634inline Path
635Mount_tree::lookup(Path const &path, cxx::Ref_ptr<Mount_tree> *mt,
636 cxx::Ref_ptr<Mount_tree> *mp) noexcept
637{
639 Path p = path;
640
641 if (p.first().cmp_path("."))
642 p.strip_first();
643
644 Path last_mp = p;
645
646 if (mp)
647 *mp = x;;
648
649 while (1)
650 {
651 Path r = x->find(p, &x);
652
653 if (!r)
654 {
655 if (mp)
656 return last_mp;
657
658 if (mt)
659 *mt = x;
660
661 return p;
662 }
663
664 r.strip_sep();
665
666 if (mp && x->_mount)
667 {
668 last_mp = r;
669 *mp = x;
670 }
671
672 if (r.empty())
673 {
674 if (mt)
675 *mt = x;
676
677 if (mp)
678 return last_mp;
679 else
680 return r;
681 }
682
683 p = r;
684 }
685}
686
687inline
688void
689Mount_tree::add_child_node(cxx::Ref_ptr<Mount_tree> const &cld)
690{
691 cld->_sib = _cld;
692 _cld = cld;
693}
694
695inline
696const char *
697File::get_mount(const char *path, cxx::Ref_ptr<File> *dir,
698 cxx::Ref_ptr<Mount_tree> *mt) noexcept
699{
700 if (!_mount_tree)
701 {
702 *dir = cxx::ref_ptr(this);
703 return path;
704 }
705
707 Path p = _mount_tree->lookup(Path(path), mt, &mp);
708 if (mp->mount())
709 {
710 *dir = mp->mount();
711 return p.path();
712 }
713 else
714 {
715 *dir = cxx::ref_ptr(this);
716 return path;
717 }
718}
719
720inline int
721File::openat(const char *path, int flags, mode_t mode,
722 cxx::Ref_ptr<File> *f) noexcept
723{
726 path = get_mount(path, &dir, &mt);
727
728 int res = dir->get_entry(path, flags, mode, f);
729
730 if (res < 0)
731 return res;
732
733 if (!(*f)->_mount_tree && mt)
734 (*f)->_mount_tree = mt;
735
736 return res;
737}
738
747class Mman
748{
749public:
751 virtual int mmap2(void *start, size_t len, int prot, int flags, int fd,
752 off_t offset, void **ptr) noexcept = 0;
753
755 virtual int munmap(void *start, size_t len) noexcept = 0;
756
758 virtual int mremap(void *old, size_t old_sz, size_t new_sz, int flags,
759 void **new_addr) noexcept = 0;
760
762 virtual int mprotect(const void *a, size_t sz, int prot) noexcept = 0;
763
765 virtual int msync(void *addr, size_t len, int flags) noexcept = 0;
766
768 virtual int madvise(void *addr, size_t len, int advice) noexcept = 0;
769
770 virtual ~Mman() noexcept = 0;
771};
772
773inline
774Mman::~Mman() noexcept {}
775
776class File_factory
777{
778private:
779 int _ref_cnt = 0;
780 int _proto = 0;
781 char const *_proto_name = 0;
782
783 template<typename T> friend struct cxx::Default_ref_counter;
784 void add_ref() noexcept { ++_ref_cnt; }
785 int remove_ref() noexcept { return --_ref_cnt; }
786
787public:
788 explicit File_factory(int proto) : _proto(proto) {}
789 explicit File_factory(char const *proto_name) : _proto_name(proto_name) {}
790 File_factory(int proto, char const *proto_name)
791 : _proto(proto), _proto_name(proto_name)
792 {}
793
794 File_factory(File_factory const &) = delete;
795 File_factory &operator = (File_factory const &) = delete;
796
797 char const *proto_name() const { return _proto_name; }
798 int proto() const { return _proto; }
799
800 virtual ~File_factory() noexcept = 0;
801 virtual cxx::Ref_ptr<File> create(L4::Cap<void> file) = 0;
802};
803
804inline File_factory::~File_factory() noexcept {}
805
806template<typename IFACE, typename IMPL>
807class File_factory_t : public File_factory
808{
809public:
810 File_factory_t()
811 : File_factory(IFACE::Protocol, L4::kobject_typeid<IFACE>()->name())
812 {}
813
814 cxx::Ref_ptr<File> create(L4::Cap<void> file) override
815 { return cxx::make_ref_obj<IMPL>(L4::cap_cast<IFACE>(file)); }
816};
817
832{
833protected:
834 File_system *_next;
835
836public:
837 File_system() noexcept : _next(0) {}
843 virtual char const *type() const noexcept = 0;
844
861 virtual int mount(char const *source, unsigned long mountflags,
862 void const *data, cxx::Ref_ptr<File> *dir) noexcept = 0;
863
864 virtual ~File_system() noexcept = 0;
865
870 File_system *next() const noexcept { return _next; }
871 File_system *&next() noexcept { return _next; }
872 void next(File_system *n) noexcept { _next = n; }
873};
874
875inline
876File_system::~File_system() noexcept
877{}
878
879class File_system_list
880{
881public:
882 class Iterator
883 {
884 public:
885 explicit constexpr Iterator(File_system *c = nullptr) : _c(c) {}
886
887 Iterator &operator++()
888 {
889 if (_c)
890 _c = _c->next();
891 return *this;
892 }
893
894 bool operator==(Iterator const &other) const { return _c == other._c; }
895 bool operator!=(Iterator const &other) const { return _c != other._c; }
896 File_system *operator*() const { return _c; }
897 File_system *operator->() const { return _c; }
898
899 private:
900 File_system *_c;
901 };
902
903 File_system_list(File_system *head) : _head(head) {}
904
905 constexpr Iterator begin() const
906 { return Iterator(_head); }
907
908 constexpr Iterator end() const
909 { return Iterator(); }
910
911private:
912 File_system *_head;
913};
914
920class Fs
921{
922public:
928 virtual cxx::Ref_ptr<File> get_file(int fd) noexcept = 0;
929
931 virtual cxx::Ref_ptr<File> get_root() noexcept = 0;
932
934 virtual cxx::Ref_ptr<File> get_cwd() noexcept { return get_root(); }
935
937 virtual void set_cwd(cxx::Ref_ptr<File> const &) noexcept {}
938
944 virtual int alloc_fd(cxx::Ref_ptr<File> const &f = cxx::Ref_ptr<>::Nil) noexcept = 0;
945
956 virtual cxx::Pair<cxx::Ref_ptr<File>, int>
957 set_fd(int fd, cxx::Ref_ptr<File> const &f = cxx::Ref_ptr<>::Nil) noexcept = 0;
958
964 virtual cxx::Ref_ptr<File> free_fd(int fd) noexcept = 0;
965
973 virtual int mount(char const *path, cxx::Ref_ptr<File> const &dir) noexcept = 0;
974
982 virtual int register_file_system(File_system *f) noexcept = 0;
983
991 virtual int unregister_file_system(File_system *f) noexcept = 0;
992
1000 virtual File_system *get_file_system(char const *fstype) noexcept = 0;
1001
1010 virtual File_system_list file_system_list() noexcept = 0;
1011
1015 int mount(char const *source, char const *target,
1016 char const *fstype, unsigned long mountflags,
1017 void const *data) noexcept;
1018
1019 virtual int register_file_factory(cxx::Ref_ptr<File_factory> f) noexcept = 0;
1020 virtual int unregister_file_factory(cxx::Ref_ptr<File_factory> f) noexcept = 0;
1021 virtual cxx::Ref_ptr<File_factory> get_file_factory(int proto) noexcept = 0;
1022 virtual cxx::Ref_ptr<File_factory> get_file_factory(char const *proto_name) noexcept = 0;
1023
1024 virtual ~Fs() = 0;
1025
1026private:
1027 int mount_one(char const *source, char const *target,
1028 File_system *fs, unsigned long mountflags,
1029 void const *data) noexcept;
1030};
1031
1032inline int
1033Fs::mount_one(char const *source, char const *target,
1034 File_system *fs, unsigned long mountflags,
1035 void const *data) noexcept
1036{
1038 int res = fs->mount(source, mountflags, data, &dir);
1039
1040 if (res < 0)
1041 return res;
1042
1043 return mount(target, dir);
1044}
1045
1046inline int
1047Fs::mount(char const *source, char const *target,
1048 char const *fstype, unsigned long mountflags,
1049 void const *data) noexcept
1050{
1051 if ( fstype[0] == 'a'
1052 && fstype[1] == 'u'
1053 && fstype[2] == 't'
1054 && fstype[3] == 'o'
1055 && fstype[4] == 0)
1056 {
1057 File_system_list fsl = file_system_list();
1058 for (File_system_list::Iterator c = fsl.begin(); c != fsl.end(); ++c)
1059 if (mount_one(source, target, *c, mountflags, data) == 0)
1060 return 0;
1061
1062 return -ENODEV;
1063 }
1064
1065 File_system *fs = get_file_system(fstype);
1066
1067 if (!fs)
1068 return -ENODEV;
1069
1070 return mount_one(source, target, fs, mountflags, data);
1071}
1072
1073inline
1074Fs::~Fs()
1075{}
1076
1083class Ops : public Mman, public Fs
1084{
1085public:
1086 virtual void *malloc(size_t bytes) noexcept = 0;
1087 virtual void free(void *mem) noexcept = 0;
1088 virtual ~Ops() noexcept = 0;
1089
1090 char *strndup(char const *str, unsigned l) noexcept
1091 {
1092 unsigned len;
1093 for (len = 0; str[len] && len < l; ++len)
1094 ;
1095
1096 if (len == 0)
1097 return nullptr;
1098
1099 ++len;
1100
1101 char *b = static_cast<char *>(this->malloc(len));
1102 if (b == nullptr)
1103 return nullptr;
1104
1105 char *r = b;
1106 for (; len - 1 > 0 && *str; --len, ++b, ++str)
1107 *b = *str;
1108
1109 *b = 0;
1110 return r;
1111 }
1112
1113};
1114
1115inline
1116Ops::~Ops() noexcept
1117{}
1118
1119}}
1120
1121#endif
1122
Abstract capability-allocator interface.
L4::Cap related definitions.
Interface for a POSIX file that is a directory.
Definition vfs.h:141
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:832
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:441
POSIX File-system related functionality.
Definition vfs.h:921
virtual void set_cwd(cxx::Ref_ptr< File > const &) noexcept
Set the current working directory for the application.
Definition vfs.h:937
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:63
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 fstat64(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).
virtual int get_status_flags() const noexcept=0
Get file status flags (fcntl F_GETFL).
Interface for POSIX memory management.
Definition vfs.h:748
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:1084
Interface for a POSIX file that provides regular file semantics.
Definition vfs.h:268
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:401
virtual int ioctl(unsigned long cmd, va_list args) noexcept=0
The famous IO control.
C++ interface for capabilities.
Definition capability.h:219
A reference-counting pointer with automatic cleanup.
Definition ref_ptr:82
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:693
L4Re C++ Interfaces.
Definition l4re.dox:17
L4 low-level kernel interface.
Definition io_regblock.h:19
Our C++ library.
Definition arith:22
Pair implementation.
Pair of two values.
Definition pair:39