L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ipc_helper
Go to the documentation of this file.
1// vi:set ft=cpp: -*- Mode: C++ -*-
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * 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/exceptions>
16#include <l4/sys/utcb.h>
17
22namespace L4
23{
24#ifdef __EXCEPTIONS
33 inline void
34 throw_ipc_exception([[maybe_unused]] L4::Cap<void> const &o,
35 l4_msgtag_t const &err, l4_utcb_t *utcb)
36 {
37 if (err.has_error())
38 throw (L4::Com_error(l4_error_u(err, utcb)));
39 }
40
49 inline void
50 throw_ipc_exception(void const *o, l4_msgtag_t const &err,
51 l4_utcb_t *utcb)
52 { throw_ipc_exception(L4::Cap<void>(o), err, utcb); }
53#endif
54
55}
C++ interface for capabilities.
Definition capability.h:219
Error conditions during IPC.
Definition exceptions:264
Base exceptions.
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
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
L4 low-level kernel interface.
Message tag data structure.
Definition types.h:153
bool has_error() const L4_NOTHROW
Test if flags indicate an error.
Definition types.h:190