Loading...
Searching...
No Matches
ipc_helper
Go to the documentation of this file.
// vi:set ft=cpp: -*- Mode: C++ -*-
/*
* (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
* 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/exceptions>
#include <l4/sys/utcb.h>
namespace L4
{
#ifdef __EXCEPTIONS
inline void
throw_ipc_exception([[maybe_unused]] L4::Cap<void> const &o,
l4_msgtag_t const &err, l4_utcb_t *utcb)
{
if (err.has_error())
throw (L4::Com_error(l4_error_u(err, utcb)));
}
inline void
throw_ipc_exception(void const *o, l4_msgtag_t const &err,
l4_utcb_t *utcb)
{ throw_ipc_exception(L4::Cap<void>(o), err, utcb); }
#endif
}
L4::Cap
C++ interface for capabilities.
Definition capability.h:224
L4::Com_error
Error conditions during IPC.
Definition exceptions:264
exceptions
Base exceptions.
L4::throw_ipc_exception
void throw_ipc_exception(L4::Cap< void > const &o, l4_msgtag_t const &err, l4_utcb_t *utcb)
Throw an L4 IPC error as exception.
Definition ipc_helper:34
l4_utcb_t
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
utcb.h
UTCB definitions.
L4
L4 low-level kernel interface.
Definition l4sys-l4f-groups.dox:50
l4_msgtag_t
Message tag data structure.
Definition types.h:154
l4_msgtag_t::has_error
bool has_error() const L4_NOTHROW
Test if flags indicate an error.
Definition types.h:191