L4Re - L4 Runtime Environment
parent
Go to the documentation of this file.
1 // -*- Mode: C++ -*-
2 // vim:ft=cpp
3 /**
4  * \file
5  * \brief Parent interface
6  */
7 /*
8  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
9  * Alexander Warg <warg@os.inf.tu-dresden.de>
10  * economic rights: Technische Universit├Ąt Dresden (Germany)
11  *
12  * This file is part of TUD:OS and distributed under the terms of the
13  * GNU General Public License 2.
14  * Please see the COPYING-GPL-2 file for details.
15  *
16  * As a special exception, you may use this file as part of a free software
17  * library without restriction. Specifically, if other files instantiate
18  * templates or use macros or inline functions from this file, or you compile
19  * this file and link it with other files to produce an executable, this
20  * file does not by itself cause the resulting executable to be covered by
21  * the GNU General Public License. This exception does not however
22  * invalidate any other reasons why the executable file might be covered by
23  * the GNU General Public License.
24  */
25 #pragma once
26 
27 #include <l4/sys/capability>
28 #include <l4/re/protocols.h>
29 #include <l4/sys/cxx/ipc_iface>
30 
31 namespace L4Re {
32 
33 /**
34  * \defgroup api_l4re_parent Parent API
35  * \ingroup api_l4re
36  * \brief Parent interface.
37  *
38  * The parent interface provides means for an L4 task to signal changes in
39  * its execution state. The main purpose is to signal program termination.
40  *
41  * \see L4Re::Parent for information about the concrete interface.
42  */
43 
44 /**
45  * \brief Parent interface
46  * \ingroup api_l4re_parent
47  *
48  * \see \link api_l4re_parent Parent API \endlink for more details about
49  * the purpose.
50  */
51 class L4_EXPORT Parent :
52  public L4::Kobject_t<Parent, L4::Kobject, L4RE_PROTO_PARENT>
53 {
54 public:
55  /**
56  * \brief Send a signal to the parent
57  * \param sig Signal to send
58  * \param val Value of the signal
59  *
60  * \return 0 on success, <0 on error
61  * - -#L4_ENOREPLY
62  * - IPC errors
63  */
64  L4_INLINE_RPC(long, signal, (unsigned long sig, unsigned long val));
65  typedef L4::Typeid::Rpcs<signal_t> Rpcs;
66 };
67 };
68