L4Re Operating System Framework
Interface and Usage Documentation
•All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 * License: see LICENSE.spdx (in this directory or the directories above)
12 */
13#pragma once
14
15#include <l4/cxx/basic_ostream>
16#include <l4/sys/types.h>
17#include <l4/sys/capability>
18
19inline
20L4::BasicOStream &operator << (L4::BasicOStream &o, l4_msgtag_t const &tag)
21{
22 L4::IOBackend::Mode m = o.be_mode();
23 o << "[l=" << L4::dec << tag.label() << "; w=" << tag.words() << "; i="
24 << tag.items() << "]";
25 o.be_mode(m);
26 return o;
27}
28
29template<typename T>
30inline
31L4::BasicOStream &operator << (L4::BasicOStream &o, L4::Cap<T> const &cap)
32{
33 o << "[C:" << L4::n_hex(cap.cap()) << "]";
34 return o;
35}
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:153
long label() const L4_NOTHROW
Get the protocol value.
Definition types.h:157
unsigned words() const L4_NOTHROW
Get the number of untyped words.
Definition types.h:168
unsigned items() const L4_NOTHROW
Get the number of typed items.
Definition types.h:170