L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
vcon_stream.h
1/*
2 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
4 *
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
8 *
9 * As a special exception, you may use this file as part of a free software
10 * library without restriction. Specifically, if other files instantiate
11 * templates or use macros or inline functions from this file, or you compile
12 * this file and link it with other files to produce an executable, this
13 * file does not by itself cause the resulting executable to be covered by
14 * the GNU General Public License. This exception does not however
15 * invalidate any other reasons why the executable file might be covered by
16 * the GNU General Public License.
17 */
18#pragma once
19
20#include <l4/sys/capability>
21#include <l4/sys/vcon>
22#include <l4/sys/semaphore>
23
24#include <l4/l4re_vfs/backend>
25
26namespace L4Re { namespace Core {
27
28class Vcon_stream : public L4Re::Vfs::Be_file_stream
29{
30private:
33 unsigned _irq_bound;
34
35public:
36 explicit Vcon_stream(L4::Cap<L4::Vcon> s) noexcept;
37
38 ssize_t readv(const struct iovec*, int iovcnt) noexcept override;
39 ssize_t writev(const struct iovec*, int iovcnt) noexcept override;
40 int fstat64(struct stat64 *buf) const noexcept override;
41 int get_status_flags() const noexcept override { return O_RDWR; }
42 int set_status_flags(long) noexcept override { return 0; }
43 int ioctl(unsigned long request, va_list args) noexcept override;
44
45 ~Vcon_stream() noexcept {}
46 void operator delete (void *) {}
47};
48
49}}
L4::Cap related definitions.
C++ interface for capabilities.
Definition capability.h:222
L4Re C++ Interfaces.
Definition cmd_control:15
Semaphore class definition.
C++ Virtual console interface.