L4Re - L4 Runtime Environment
exception
Go to the documentation of this file.
1 // vi:set ft=cpp: -*- Mode: C++ -*-
2 /**
3  * \file
4  * Exception C++ interface.
5  */
6 /*
7  * (c) 2014 Alexander Warg <alexander.warg@kernkonzept.com>
8  *
9  * This file is part of TUD:OS and distributed under the terms of the
10  * GNU General Public License 2.
11  * Please see the COPYING-GPL-2 file for details.
12  *
13  * As a special exception, you may use this file as part of a free software
14  * library without restriction. Specifically, if other files instantiate
15  * templates or use macros or inline functions from this file, or you compile
16  * this file and link it with other files to produce an executable, this
17  * file does not by itself cause the resulting executable to be covered by
18  * the GNU General Public License. This exception does not however
19  * invalidate any other reasons why the executable file might be covered by
20  * the GNU General Public License.
21  */
22 
23 #pragma once
24 
25 #include <l4/sys/capability>
26 #include <l4/sys/types.h>
27 #include <l4/sys/cxx/ipc_types>
28 #include <l4/sys/cxx/ipc_iface>
29 
30 namespace L4 {
31 
32 /**
33  * Exception interface.
34  */
35 class L4_EXPORT Exception :
36  public Kobject_0t<Exception, L4_PROTO_EXCEPTION>
37 {
38 public:
39  // TODO: pass a reference/pointer to the UTCB not copy the regs
40  /**
41  * Exception call
42  *
43  * \param regs Register state of the faulting thread.
44  * \param rwin Receive window in the address space.
45  * \param[out] fp Optional flex-page to resolve the exception.
46  *
47  * \return Message tag containing error code.
48  *
49  */
50  L4_INLINE_RPC(
51  l4_msgtag_t, exception, (L4::Ipc::In_out<l4_exc_regs_t *> regs,
52  L4::Ipc::Rcv_fpage rwin,
53  L4::Ipc::Opt<L4::Ipc::Snd_fpage &> fp));
54 
55  typedef L4::Typeid::Rpc_nocode<exception_t> Rpcs;
56 };
57 
58 }