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 31namespace 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 its 39 * execution state. The main purpose is to signal program termination to the 40 * program that started it, so that its resources can be reclaimed. In a typical 41 * L4Re system, this program will be Moe or Ned. 42 * 43 * \see L4Re::Parent for information about the concrete interface. 44 */ 45 46/** 47 * \brief Parent interface 48 * \ingroup api_l4re_parent 49 * 50 * \see \link api_l4re_parent Parent API \endlink for more details about 51 * the purpose. 52 */ 53class L4_EXPORT Parent : 54 public L4::Kobject_t<Parent, L4::Kobject, L4RE_PROTO_PARENT> 55{ 56public: 57 /** 58 * \brief Send a signal to the parent 59 * \param sig Signal to send 60 * \param val Value of the signal 61 * 62 * \return 0 on success, <0 on error 63 * - -#L4_ENOREPLY 64 * - IPC errors 65 */ 66 L4_INLINE_RPC(long, signal, (unsigned long sig, unsigned long val)); 67 typedef L4::Typeid::Rpcs<signal_t> Rpcs; 68}; 69}; 70 71