Files
moslab-code/src/l4/pkg/l4re-core/cxx/lib/io/include/l4iostream
2025-09-12 15:55:45 +02:00

36 lines
807 B
C++

// -*- Mode: C++ -*-
// vim:ft=cpp
/**
* \file
* \brief L4 IO stream
*/
/*
* (c) 2004-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/cxx/basic_ostream>
#include <l4/sys/types.h>
#include <l4/sys/capability>
inline
L4::BasicOStream &operator << (L4::BasicOStream &o, l4_msgtag_t const &tag)
{
L4::IOBackend::Mode m = o.be_mode();
o << "[l=" << L4::dec << tag.label() << "; w=" << tag.words() << "; i="
<< tag.items() << "]";
o.be_mode(m);
return o;
}
template<typename T>
inline
L4::BasicOStream &operator << (L4::BasicOStream &o, L4::Cap<T> const &cap)
{
o << "[C:" << L4::n_hex(cap.cap()) << "]";
return o;
}