// vi:set ft=cpp: -*- Mode: C++ -*- /** * \file * The C++ Receive endpoint interface. */ /* * (c) 2017 Alexander Warg * * This file is part of TUD:OS and distributed under the terms of the * GNU General Public License 2. * Please see the COPYING-GPL-2 file for details. * * As a special exception, you may use this file as part of a free software * library without restriction. Specifically, if other files instantiate * templates or use macros or inline functions from this file, or you compile * this file and link it with other files to produce an executable, this * file does not by itself cause the resulting executable to be covered by * the GNU General Public License. This exception does not however * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. */ #pragma once #include #include #include #include namespace L4 { class Thread; /** * Interface for kernel objects that allow to receive IPC from them. * * Such an object is for example an Ipc_gate (with server rights) or an * Irq_sender. Those objects allow to bind a thread that shall receive IPC from * these object via bind_thread(). */ class L4_EXPORT Rcv_endpoint : public Kobject_t > { public: /** * Bind a thread to an IPC receive endpoint. * * \param t Thread object that shall be bound to this receive endpoint. * \param label Label to assign to `this` receive endpoint. The two least * significant bits should usually be set to zero. * * \return Syscall return tag containing one of the following return codes. * * \retval L4_EOK Operation successful. * \retval -L4_EINVAL `t` is not a thread object or other arguments were * malformed. * \retval -L4_EPERM No #L4_CAP_FPAGE_S rights on `t` or the capability used * to invoke this operation. */ L4_INLINE_RPC_OP(L4_RCV_EP_BIND_OP, l4_msgtag_t, bind_thread, (Ipc::Opt > t, l4_umword_t label)); typedef L4::Typeid::Rpcs_sys Rpcs; }; }