L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
l4iostream
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2// vim:ft=cpp
7/*
8 * (c) 2004-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
9 * economic rights: Technische Universität Dresden (Germany)
10 *
11 * This file is part of TUD:OS and distributed under the terms of the
12 * GNU General Public License 2.
13 * Please see the COPYING-GPL-2 file for details.
14 *
15 * As a special exception, you may use this file as part of a free software
16 * library without restriction. Specifically, if other files instantiate
17 * templates or use macros or inline functions from this file, or you compile
18 * this file and link it with other files to produce an executable, this
19 * file does not by itself cause the resulting executable to be covered by
20 * the GNU General Public License. This exception does not however
21 * invalidate any other reasons why the executable file might be covered by
22 * the GNU General Public License.
23 */
24#pragma once
25
26#include <l4/cxx/basic_ostream>
27#include <l4/sys/types.h>
28#include <l4/sys/capability>
29
30inline
31L4::BasicOStream &operator << (L4::BasicOStream &o, l4_msgtag_t const &tag)
32{
33 L4::IOBackend::Mode m = o.be_mode();
34 o << "[l=" << L4::dec << tag.label() << "; w=" << tag.words() << "; i="
35 << tag.items() << "]";
36 o.be_mode(m);
37 return o;
38}
39
40template<typename T>
41inline
42L4::BasicOStream &operator << (L4::BasicOStream &o, L4::Cap<T> const &cap)
43{
44 o << "[C:" << L4::n_hex(cap.cap()) << "]";
45 return o;
46}
Basic IO stream.
L4::Cap related definitions.
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition capability.h:49
C++ interface for capabilities.
Definition capability.h:219
Common L4 ABI Data Types.
IOModifier const dec
Modifies the stream to print numbers as decimal values.
Message tag data structure.
Definition types.h:164
long label() const L4_NOTHROW
Get the protocol value.
Definition types.h:168
unsigned words() const L4_NOTHROW
Get the number of untyped words.
Definition types.h:172
unsigned items() const L4_NOTHROW
Get the number of typed items.
Definition types.h:174